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
- QilVisitor.cs
- xsdvalidator.cs
- ImportOptions.cs
- Point3DKeyFrameCollection.cs
- HyperLinkField.cs
- AuthenticationSection.cs
- KeyValueConfigurationElement.cs
- WeakHashtable.cs
- XamlSerializationHelper.cs
- cryptoapiTransform.cs
- oledbmetadatacollectionnames.cs
- CodeAssignStatement.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- DefaultTraceListener.cs
- RectangleF.cs
- CalendarDesigner.cs
- SqlGatherConsumedAliases.cs
- PropertyDescriptorGridEntry.cs
- Button.cs
- PanelStyle.cs
- MultiPropertyDescriptorGridEntry.cs
- SingleQueryOperator.cs
- MailMessage.cs
- DataView.cs
- ECDiffieHellmanCng.cs
- Timer.cs
- _HeaderInfoTable.cs
- DataTemplate.cs
- DefaultValueConverter.cs
- TextServicesCompartmentContext.cs
- ListBindableAttribute.cs
- ResourceExpressionEditor.cs
- HttpsTransportElement.cs
- VisualTreeUtils.cs
- NextPreviousPagerField.cs
- StylusLogic.cs
- RecipientInfo.cs
- EntityCollection.cs
- EditorAttribute.cs
- AnimationStorage.cs
- LookupNode.cs
- Decimal.cs
- SiteMapNodeCollection.cs
- ImageIndexEditor.cs
- BindingManagerDataErrorEventArgs.cs
- DesignerToolStripControlHost.cs
- BitmapCacheBrush.cs
- TemplateApplicationHelper.cs
- Wildcard.cs
- TagMapInfo.cs
- FileDataSourceCache.cs
- BamlStream.cs
- SpellerError.cs
- CryptoConfig.cs
- EventlogProvider.cs
- DataFormat.cs
- AssemblyBuilderData.cs
- invalidudtexception.cs
- GroupPartitionExpr.cs
- AppDomainUnloadedException.cs
- Comparer.cs
- Crc32Helper.cs
- OutputCacheModule.cs
- BitmapEffectInput.cs
- ServerValidateEventArgs.cs
- uribuilder.cs
- KeyedPriorityQueue.cs
- TaskSchedulerException.cs
- ProviderConnectionPointCollection.cs
- Policy.cs
- Size.cs
- TransformDescriptor.cs
- AppLevelCompilationSectionCache.cs
- CodeCatchClauseCollection.cs
- UrlUtility.cs
- PagedDataSource.cs
- ConsumerConnectionPointCollection.cs
- WebPartConnectVerb.cs
- MultiView.cs
- HitTestWithPointDrawingContextWalker.cs
- DecimalStorage.cs
- GrammarBuilderPhrase.cs
- DataSourceSelectArguments.cs
- TableCellAutomationPeer.cs
- StringDictionaryEditor.cs
- DbMetaDataFactory.cs
- CapabilitiesState.cs
- ListInitExpression.cs
- DigitalSignature.cs
- ThumbAutomationPeer.cs
- FormatStringEditor.cs
- ConfigUtil.cs
- MenuItemAutomationPeer.cs
- _ProxyChain.cs
- CustomSignedXml.cs
- ProfileParameter.cs
- ImageAttributes.cs
- XmlCharCheckingReader.cs
- COM2ColorConverter.cs
- CodeIdentifier.cs