Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- TransportSecurityProtocolFactory.cs
- Registry.cs
- ArgumentNullException.cs
- SmtpLoginAuthenticationModule.cs
- NativeMethods.cs
- ListDesigner.cs
- WindowsMenu.cs
- NumberFormatter.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- FunctionImportMapping.cs
- MultilineStringConverter.cs
- DSACryptoServiceProvider.cs
- SqlCacheDependency.cs
- EncryptionUtility.cs
- tibetanshape.cs
- CategoryAttribute.cs
- XmlTextAttribute.cs
- TargetConverter.cs
- RequestUriProcessor.cs
- SchemaAttDef.cs
- Annotation.cs
- GroupItemAutomationPeer.cs
- ResourceType.cs
- ObjectAnimationBase.cs
- XmlTypeAttribute.cs
- CursorConverter.cs
- BasicKeyConstraint.cs
- EditorPartCollection.cs
- ServiceNameCollection.cs
- tooltip.cs
- Point3DAnimationUsingKeyFrames.cs
- XmlSortKeyAccumulator.cs
- PropertyTab.cs
- EncodingNLS.cs
- HMACSHA384.cs
- FlowNode.cs
- QilPatternVisitor.cs
- DataComponentGenerator.cs
- ObfuscateAssemblyAttribute.cs
- BamlVersionHeader.cs
- TdsValueSetter.cs
- HybridDictionary.cs
- XmlHierarchicalEnumerable.cs
- ColorTransformHelper.cs
- StringToken.cs
- TraceLevelHelper.cs
- ServerValidateEventArgs.cs
- dsa.cs
- ServiceEndpointCollection.cs
- ObjectSecurity.cs
- SharedPersonalizationStateInfo.cs
- SubMenuStyleCollection.cs
- EventLog.cs
- DeploymentSectionCache.cs
- TerminateDesigner.cs
- BitmapImage.cs
- TextBlock.cs
- DiscreteKeyFrames.cs
- OutputScopeManager.cs
- TcpChannelListener.cs
- ToolStripOverflowButton.cs
- HttpCacheParams.cs
- WsdlImporter.cs
- MouseCaptureWithinProperty.cs
- EpmSourcePathSegment.cs
- BindingSource.cs
- FontDriver.cs
- StartUpEventArgs.cs
- XmlSignificantWhitespace.cs
- LocatorGroup.cs
- AssociationSetMetadata.cs
- OutputCacheProfile.cs
- SmtpReplyReader.cs
- XmlSequenceWriter.cs
- Quaternion.cs
- ControlEvent.cs
- Scanner.cs
- SQLUtility.cs
- HandlerBase.cs
- ClaimTypes.cs
- TableRowCollection.cs
- KeyTime.cs
- HostProtectionException.cs
- ValidationErrorEventArgs.cs
- CompositeKey.cs
- DataMemberConverter.cs
- PageHandlerFactory.cs
- WorkflowControlClient.cs
- Color.cs
- ActivityScheduledRecord.cs
- HostAdapter.cs
- BitmapPalette.cs
- COM2ExtendedUITypeEditor.cs
- HtmlControl.cs
- RadioButtonFlatAdapter.cs
- SemanticResolver.cs
- SplineKeyFrames.cs
- LinqDataSourceContextEventArgs.cs
- ListDictionary.cs
- DataGridCaption.cs