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
- ChannelSettingsElement.cs
- StyleSelector.cs
- DesigntimeLicenseContextSerializer.cs
- InstallerTypeAttribute.cs
- TextParaClient.cs
- MenuScrollingVisibilityConverter.cs
- DisplayMemberTemplateSelector.cs
- ZipFileInfoCollection.cs
- AttributeEmitter.cs
- _AuthenticationState.cs
- FlowStep.cs
- ConfigurationManagerInternalFactory.cs
- TileModeValidation.cs
- NameTable.cs
- RemoteWebConfigurationHost.cs
- RepeatButtonAutomationPeer.cs
- ListViewEditEventArgs.cs
- XmlAutoDetectWriter.cs
- StreamInfo.cs
- ArglessEventHandlerProxy.cs
- Pen.cs
- Attribute.cs
- FontWeight.cs
- DataSourceCollectionBase.cs
- DebugInfo.cs
- SliderAutomationPeer.cs
- ValidatorUtils.cs
- StackOverflowException.cs
- DateBoldEvent.cs
- WebProxyScriptElement.cs
- XmlSchemaAnnotated.cs
- HTMLTagNameToTypeMapper.cs
- UserMapPath.cs
- ImageAttributes.cs
- InfoCardProofToken.cs
- ConnectionManagementSection.cs
- CustomAttribute.cs
- PathGradientBrush.cs
- HighContrastHelper.cs
- ImageMetadata.cs
- BrowserCapabilitiesFactoryBase.cs
- DataSvcMapFileSerializer.cs
- RecognitionResult.cs
- MethodImplAttribute.cs
- XmlQueryCardinality.cs
- RuntimeDelegateArgument.cs
- WebPartManager.cs
- WebPartAddingEventArgs.cs
- PathSegment.cs
- LayoutEngine.cs
- PropertyGroupDescription.cs
- Select.cs
- cookiecontainer.cs
- baseaxisquery.cs
- ChainOfResponsibility.cs
- PersonalizableAttribute.cs
- MobileControlBuilder.cs
- RolePrincipal.cs
- ActivityValidator.cs
- VirtualPath.cs
- XhtmlStyleClass.cs
- ResXFileRef.cs
- Attributes.cs
- _ListenerResponseStream.cs
- HttpCookiesSection.cs
- TextElement.cs
- ServiceRoute.cs
- TemplateLookupAction.cs
- Triangle.cs
- NamedPipeTransportSecurity.cs
- WebConfigurationHostFileChange.cs
- Activity.cs
- Environment.cs
- _DomainName.cs
- EntityDataSourceView.cs
- PerspectiveCamera.cs
- Int32EqualityComparer.cs
- MailAddressCollection.cs
- Cursors.cs
- PersonalizablePropertyEntry.cs
- WpfWebRequestHelper.cs
- ListViewContainer.cs
- TraceSection.cs
- MatrixConverter.cs
- CollectionViewGroupRoot.cs
- OleDbConnection.cs
- SecurityException.cs
- LinkGrep.cs
- TemplateControlBuildProvider.cs
- Quaternion.cs
- SmtpTransport.cs
- AddInEnvironment.cs
- GlobalEventManager.cs
- PhoneCallDesigner.cs
- SqlOuterApplyReducer.cs
- QuadraticBezierSegment.cs
- HttpPostedFileWrapper.cs
- ArgumentReference.cs
- RotationValidation.cs
- QilName.cs