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
- Delegate.cs
- XmlSchemaInfo.cs
- EventLogger.cs
- Rotation3D.cs
- HttpBrowserCapabilitiesWrapper.cs
- StringOutput.cs
- TrustLevelCollection.cs
- InboundActivityHelper.cs
- ZipPackagePart.cs
- RepeaterItemCollection.cs
- DelegatingTypeDescriptionProvider.cs
- RoutingExtension.cs
- TextDecoration.cs
- QuarticEase.cs
- BitmapMetadataEnumerator.cs
- SortFieldComparer.cs
- PropertyFilterAttribute.cs
- FormsAuthenticationCredentials.cs
- VirtualPathProvider.cs
- BufferAllocator.cs
- counter.cs
- Select.cs
- RequestCachePolicy.cs
- TouchesCapturedWithinProperty.cs
- SoapWriter.cs
- SiteIdentityPermission.cs
- SoapHttpTransportImporter.cs
- UIAgentCrashedException.cs
- TextCharacters.cs
- FormViewUpdatedEventArgs.cs
- ConstructorNeedsTagAttribute.cs
- WebUtil.cs
- WriteTimeStream.cs
- ProfileSettingsCollection.cs
- AnnotationResource.cs
- QualifiedCellIdBoolean.cs
- DecimalAnimationUsingKeyFrames.cs
- CollectionsUtil.cs
- DataTableReaderListener.cs
- WebBrowserBase.cs
- WebRequest.cs
- DataReceivedEventArgs.cs
- Message.cs
- Classification.cs
- ElementNotAvailableException.cs
- CapacityStreamGeometryContext.cs
- invalidudtexception.cs
- SqlCharStream.cs
- VectorAnimationBase.cs
- XmlIncludeAttribute.cs
- UInt64Storage.cs
- GlobalizationSection.cs
- Lasso.cs
- XmlMtomReader.cs
- UnsafeNativeMethods.cs
- StatusBarPanelClickEvent.cs
- AssemblyCache.cs
- Dictionary.cs
- BitmapFrameEncode.cs
- AjaxFrameworkAssemblyAttribute.cs
- XmlDocument.cs
- XmlConvert.cs
- URLMembershipCondition.cs
- DataObjectEventArgs.cs
- GetImportedCardRequest.cs
- ScrollBarAutomationPeer.cs
- CfgSemanticTag.cs
- TextRangeEditTables.cs
- Win32Exception.cs
- DesignTimeHTMLTextWriter.cs
- ReaderContextStackData.cs
- DataGridViewRowPostPaintEventArgs.cs
- PagedDataSource.cs
- GroupQuery.cs
- ComplexLine.cs
- MenuCommand.cs
- URLEditor.cs
- ControlIdConverter.cs
- _SslSessionsCache.cs
- ErrorReporting.cs
- TableSectionStyle.cs
- Logging.cs
- InputElement.cs
- GradientSpreadMethodValidation.cs
- EnvelopedSignatureTransform.cs
- HexParser.cs
- Module.cs
- isolationinterop.cs
- X509SubjectKeyIdentifierClause.cs
- _WebProxyDataBuilder.cs
- HostingEnvironment.cs
- SqlDataSourceCustomCommandEditor.cs
- SessionPageStateSection.cs
- DataRelationCollection.cs
- AnnotationResourceChangedEventArgs.cs
- EventWaitHandleSecurity.cs
- ByteStack.cs
- CellTreeNode.cs
- LinqDataSourceContextEventArgs.cs
- CompilerError.cs