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
- BulletDecorator.cs
- BindingValueChangedEventArgs.cs
- PerformanceCounterLib.cs
- OdbcDataAdapter.cs
- Helpers.cs
- PhysicalFontFamily.cs
- ThemeableAttribute.cs
- SID.cs
- DetailsViewRowCollection.cs
- MimeReturn.cs
- SmtpSection.cs
- OracleDateTime.cs
- DataDocumentXPathNavigator.cs
- FragmentQuery.cs
- x509utils.cs
- FlowDocumentReaderAutomationPeer.cs
- ReadingWritingEntityEventArgs.cs
- SecurityRequiresReviewAttribute.cs
- InstancePersistenceCommandException.cs
- EntityDataSourceDataSelection.cs
- MostlySingletonList.cs
- ToolStripEditorManager.cs
- PageDeviceFont.cs
- PersonalizationStateInfo.cs
- BrowserCapabilitiesCodeGenerator.cs
- TableCell.cs
- FixedFindEngine.cs
- ColumnResult.cs
- JobStaple.cs
- COSERVERINFO.cs
- CommandTreeTypeHelper.cs
- DataGridCommandEventArgs.cs
- ScrollViewerAutomationPeer.cs
- Polyline.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- PrintPreviewDialog.cs
- StatusBarAutomationPeer.cs
- DeviceContexts.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- UInt32Storage.cs
- SchemaInfo.cs
- PointAnimationUsingPath.cs
- CaseInsensitiveHashCodeProvider.cs
- StringPropertyBuilder.cs
- IChannel.cs
- RuleRef.cs
- ProfileModule.cs
- SQLCharsStorage.cs
- LineBreakRecord.cs
- PagerSettings.cs
- XmlDataCollection.cs
- ToolStripTextBox.cs
- StrongTypingException.cs
- SqlDataReaderSmi.cs
- Section.cs
- IconConverter.cs
- AppDomainUnloadedException.cs
- XmlIlGenerator.cs
- ButtonBaseAdapter.cs
- XmlSchemaChoice.cs
- _BaseOverlappedAsyncResult.cs
- TokenBasedSetEnumerator.cs
- BitmapCache.cs
- HtmlElement.cs
- AppDomainFactory.cs
- CatalogZone.cs
- SmiContextFactory.cs
- TokenBasedSet.cs
- Schema.cs
- RequestCacheEntry.cs
- AsyncSerializedWorker.cs
- BooleanAnimationBase.cs
- Screen.cs
- ProfilePropertyNameValidator.cs
- PageStatePersister.cs
- GridViewCellAutomationPeer.cs
- SchemaImporterExtensionElement.cs
- Literal.cs
- GACMembershipCondition.cs
- ExtensibleClassFactory.cs
- StatusBarItem.cs
- Int32AnimationUsingKeyFrames.cs
- BinaryFormatter.cs
- GrammarBuilder.cs
- DragSelectionMessageFilter.cs
- InvalidPrinterException.cs
- ReachIDocumentPaginatorSerializer.cs
- WorkflowMessageEventArgs.cs
- ListenerUnsafeNativeMethods.cs
- OperatingSystem.cs
- ProcessModuleCollection.cs
- DesignColumn.cs
- CompiledRegexRunner.cs
- NGCSerializationManagerAsync.cs
- Cursors.cs
- PropertyGeneratedEventArgs.cs
- SmtpMail.cs
- CfgSemanticTag.cs
- Executor.cs
- CannotUnloadAppDomainException.cs