Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Common / Utils / InternalBase.cs / 1 / InternalBase.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections; using System.Text; namespace System.Data.Common.Utils { // A basic class from which all classes derive so that ToString can be // more controlled internal abstract class InternalBase { // effects: Modify builder to contain a compact string representation // of this internal abstract void ToCompactString(StringBuilder builder); // effects: Modify builder to contain a verbose string representation // of this internal virtual void ToFullString(StringBuilder builder) { ToCompactString(builder); } // Check the internal state of the data structure -- if it is invalid // throw an exception. If it is ok, return true. This signature allows // this method to be used in Debug.Assert and for regular use to catch // internal errors internal virtual bool CheckRepInvariant() { // As we keep adding Validate to the rest of the code, // we will make this method abstract return true; } public override string ToString() { StringBuilder builder = new StringBuilder(); ToCompactString(builder); return builder.ToString(); } internal virtual string ToFullString() { StringBuilder builder = new StringBuilder(); ToFullString(builder); return builder.ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections; using System.Text; namespace System.Data.Common.Utils { // A basic class from which all classes derive so that ToString can be // more controlled internal abstract class InternalBase { // effects: Modify builder to contain a compact string representation // of this internal abstract void ToCompactString(StringBuilder builder); // effects: Modify builder to contain a verbose string representation // of this internal virtual void ToFullString(StringBuilder builder) { ToCompactString(builder); } // Check the internal state of the data structure -- if it is invalid // throw an exception. If it is ok, return true. This signature allows // this method to be used in Debug.Assert and for regular use to catch // internal errors internal virtual bool CheckRepInvariant() { // As we keep adding Validate to the rest of the code, // we will make this method abstract return true; } public override string ToString() { StringBuilder builder = new StringBuilder(); ToCompactString(builder); return builder.ToString(); } internal virtual string ToFullString() { StringBuilder builder = new StringBuilder(); ToFullString(builder); return builder.ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HyperLinkDataBindingHandler.cs
- ParallelTimeline.cs
- SiteOfOriginPart.cs
- ToolStripScrollButton.cs
- FieldMetadata.cs
- FlowDocumentPage.cs
- TdsValueSetter.cs
- TextChange.cs
- EpmSyndicationContentSerializer.cs
- SQLInt64Storage.cs
- RegexWorker.cs
- _Events.cs
- SqlServices.cs
- ExeConfigurationFileMap.cs
- SiteMapHierarchicalDataSourceView.cs
- securitycriticaldataClass.cs
- EntityPropertyMappingAttribute.cs
- PageParser.cs
- CompositeCollectionView.cs
- HostedNamedPipeTransportManager.cs
- FixedLineResult.cs
- EmptyEnumerable.cs
- LoginUtil.cs
- SQLByteStorage.cs
- InternalUserCancelledException.cs
- SqlFlattener.cs
- TransformerTypeCollection.cs
- DbProviderFactories.cs
- Run.cs
- LoginUtil.cs
- CompModSwitches.cs
- SafeArrayTypeMismatchException.cs
- RectIndependentAnimationStorage.cs
- DataPagerCommandEventArgs.cs
- CodeDirectionExpression.cs
- XsltCompileContext.cs
- ParseChildrenAsPropertiesAttribute.cs
- Privilege.cs
- DataGridTextBox.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- CachedCompositeFamily.cs
- _SecureChannel.cs
- CatchBlock.cs
- TextParaClient.cs
- ClientBuildManagerCallback.cs
- arc.cs
- ToolboxItemFilterAttribute.cs
- SizeFConverter.cs
- ELinqQueryState.cs
- SignatureResourcePool.cs
- DateTimeOffset.cs
- KnownTypes.cs
- XmlEncodedRawTextWriter.cs
- Figure.cs
- TableItemPatternIdentifiers.cs
- TextBoxBaseDesigner.cs
- RadioButtonPopupAdapter.cs
- SHA384Managed.cs
- DateRangeEvent.cs
- WebPartsPersonalizationAuthorization.cs
- ProfileModule.cs
- XNodeNavigator.cs
- ToolTip.cs
- SolidColorBrush.cs
- BamlRecords.cs
- EntryWrittenEventArgs.cs
- PageRequestManager.cs
- InfoCardSymmetricAlgorithm.cs
- KeyboardNavigation.cs
- EncodingConverter.cs
- DocumentViewer.cs
- ResourceAttributes.cs
- FlowThrottle.cs
- PathGeometry.cs
- TagMapCollection.cs
- CodeTypeDeclaration.cs
- TypeSystemProvider.cs
- WindowsProgressbar.cs
- FloaterBaseParagraph.cs
- Vertex.cs
- RuntimeCompatibilityAttribute.cs
- InteropExecutor.cs
- CodeMemberProperty.cs
- ItemDragEvent.cs
- InteropExecutor.cs
- LoadWorkflowAsyncResult.cs
- SQLInt32.cs
- nulltextnavigator.cs
- BaseValidator.cs
- XmlElementAttributes.cs
- DataControlField.cs
- TCPListener.cs
- ToolStripInSituService.cs
- XPathDocument.cs
- RefExpr.cs
- Brushes.cs
- PathData.cs
- WizardStepCollectionEditor.cs
- WithStatement.cs
- ServiceObjectContainer.cs