Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- ArgumentNullException.cs
- WebPartMinimizeVerb.cs
- MemberRelationshipService.cs
- SpanIndex.cs
- PersonalizableAttribute.cs
- BlurBitmapEffect.cs
- AnimationClockResource.cs
- SqlUtils.cs
- XmlLoader.cs
- SvcMapFile.cs
- DrawingContextDrawingContextWalker.cs
- ProfileInfo.cs
- EventManager.cs
- AssemblyAttributes.cs
- UriSection.cs
- WebHeaderCollection.cs
- QueueProcessor.cs
- Identity.cs
- Literal.cs
- InputQueue.cs
- counter.cs
- BinaryFormatterWriter.cs
- RegexWriter.cs
- XmlSiteMapProvider.cs
- MarginsConverter.cs
- AccessViolationException.cs
- BufferModeSettings.cs
- UserControlCodeDomTreeGenerator.cs
- CodeMethodInvokeExpression.cs
- ByteFacetDescriptionElement.cs
- MergablePropertyAttribute.cs
- EmbeddedMailObject.cs
- RegexTree.cs
- GeometryHitTestParameters.cs
- X509Utils.cs
- SharedStatics.cs
- storepermission.cs
- OrderingQueryOperator.cs
- AuthenticatingEventArgs.cs
- DataGridViewRowsAddedEventArgs.cs
- XPathException.cs
- AssemblyInfo.cs
- OleDbMetaDataFactory.cs
- MouseEvent.cs
- LastQueryOperator.cs
- CFGGrammar.cs
- PropertyCondition.cs
- Light.cs
- RequestCachingSection.cs
- ObjectDataSourceFilteringEventArgs.cs
- TextElementEnumerator.cs
- XmlImplementation.cs
- TextAdaptor.cs
- ConstantProjectedSlot.cs
- OdbcException.cs
- FontNamesConverter.cs
- OdbcDataReader.cs
- OverrideMode.cs
- SerializationEventsCache.cs
- EventDescriptor.cs
- NumberAction.cs
- Decorator.cs
- UnknownWrapper.cs
- SamlAuthenticationStatement.cs
- DataMisalignedException.cs
- ReliableMessagingVersionConverter.cs
- DataRecord.cs
- SystemIPGlobalProperties.cs
- HTMLTextWriter.cs
- TextDecorationCollection.cs
- WebBrowserNavigatingEventHandler.cs
- ConfigXmlSignificantWhitespace.cs
- IdentifierService.cs
- columnmapfactory.cs
- ComponentEditorForm.cs
- InvariantComparer.cs
- QueryReaderSettings.cs
- ConditionCollection.cs
- BindUriHelper.cs
- Hex.cs
- JumpPath.cs
- TemplateXamlParser.cs
- ReaderOutput.cs
- ClientSideProviderDescription.cs
- PolygonHotSpot.cs
- DataGridViewComboBoxEditingControl.cs
- PointCollection.cs
- ServiceDebugBehavior.cs
- Win32Exception.cs
- TrailingSpaceComparer.cs
- ClientTarget.cs
- InstancePersistenceContext.cs
- WizardForm.cs
- _FtpDataStream.cs
- CodeSubDirectoriesCollection.cs
- DriveInfo.cs
- BamlReader.cs
- TextDecorationCollection.cs
- PopupRoot.cs
- SignatureDescription.cs