Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- DbXmlEnabledProviderManifest.cs
- SHA512Managed.cs
- MethodBuilderInstantiation.cs
- DataGridTemplateColumn.cs
- CredentialSelector.cs
- KeyConverter.cs
- Formatter.cs
- ping.cs
- RangeContentEnumerator.cs
- PixelFormats.cs
- FontStyle.cs
- xsdvalidator.cs
- StringConverter.cs
- SecurityException.cs
- BinaryParser.cs
- Itemizer.cs
- FixedElement.cs
- JsonReaderDelegator.cs
- FilterUserControlBase.cs
- IgnoreSectionHandler.cs
- EntityUtil.cs
- ParsedRoute.cs
- DbCommandTree.cs
- ListChangedEventArgs.cs
- CheckBoxField.cs
- ItemCollection.cs
- TraceHandlerErrorFormatter.cs
- ToolStripDesignerUtils.cs
- WindowsAuthenticationModule.cs
- ScrollItemPattern.cs
- BuilderInfo.cs
- fixedPageContentExtractor.cs
- ExtensionSimplifierMarkupObject.cs
- PropertyDescriptor.cs
- EntityProviderFactory.cs
- FileDialog.cs
- CheckBoxFlatAdapter.cs
- ResolveCriteria11.cs
- RuleProcessor.cs
- OutputCacheSettings.cs
- TextRangeEditLists.cs
- SelectedDatesCollection.cs
- HttpListenerContext.cs
- UiaCoreApi.cs
- Inline.cs
- ValidationRule.cs
- CompositeDataBoundControl.cs
- XmlSchemaAnnotation.cs
- ScalarType.cs
- DbConnectionPoolGroupProviderInfo.cs
- SpecialTypeDataContract.cs
- OutputCacheProfileCollection.cs
- TdsValueSetter.cs
- StaticSiteMapProvider.cs
- bidPrivateBase.cs
- SharedUtils.cs
- StackSpiller.Temps.cs
- RelatedCurrencyManager.cs
- TextBoxAutomationPeer.cs
- EdmEntityTypeAttribute.cs
- FloatMinMaxAggregationOperator.cs
- TimeStampChecker.cs
- UndirectedGraph.cs
- DataKeyCollection.cs
- XamlDesignerSerializationManager.cs
- TemplateBindingExtensionConverter.cs
- TextFormatter.cs
- ComboBoxAutomationPeer.cs
- SimpleWebHandlerParser.cs
- AcceptorSessionSymmetricTransportSecurityProtocol.cs
- DataGridParentRows.cs
- DataControlButton.cs
- AnimationException.cs
- DynamicILGenerator.cs
- PersonalizableTypeEntry.cs
- ActivityBindForm.cs
- SizeChangedInfo.cs
- InvalidPrinterException.cs
- CssStyleCollection.cs
- HashHelpers.cs
- DesignTimeValidationFeature.cs
- MultipartIdentifier.cs
- BaseParaClient.cs
- SecurityManager.cs
- EntityDataSourceDesignerHelper.cs
- SqlDataSourceSelectingEventArgs.cs
- TypeUtil.cs
- IndexOutOfRangeException.cs
- WebPartConnectionsEventArgs.cs
- ClientConfigurationHost.cs
- DBConnectionString.cs
- DetailsViewModeEventArgs.cs
- _IPv4Address.cs
- Exceptions.cs
- DataErrorValidationRule.cs
- XmlBoundElement.cs
- SubMenuStyleCollection.cs
- ElasticEase.cs
- SigningCredentials.cs
- SerializationFieldInfo.cs