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
- ListControlBuilder.cs
- ResourceExpressionBuilder.cs
- SqlParameterizer.cs
- SMSvcHost.cs
- DataTableReader.cs
- ConfigurationValue.cs
- CredentialCache.cs
- PageContent.cs
- QilReference.cs
- StateMachineWorkflowInstance.cs
- TextBoxRenderer.cs
- _SslStream.cs
- ControlAdapter.cs
- PhysicalFontFamily.cs
- RectangleF.cs
- SqlStatistics.cs
- XPathChildIterator.cs
- PathGeometry.cs
- LoginCancelEventArgs.cs
- SqlTrackingService.cs
- ObjectListComponentEditor.cs
- FontFamilyValueSerializer.cs
- AnimationTimeline.cs
- RootDesignerSerializerAttribute.cs
- ConfigurationStrings.cs
- DataGridViewColumnConverter.cs
- PeerNearMe.cs
- EdmItemError.cs
- RefExpr.cs
- ForceCopyBuildProvider.cs
- QueryPageSettingsEventArgs.cs
- DrawingCollection.cs
- OleDbStruct.cs
- TemplatePropertyEntry.cs
- ColorKeyFrameCollection.cs
- SqlDependency.cs
- IndexedEnumerable.cs
- ProcessProtocolHandler.cs
- ActivityXRefPropertyEditor.cs
- Filter.cs
- ByteStorage.cs
- DetailsViewPageEventArgs.cs
- HijriCalendar.cs
- BindingListCollectionView.cs
- IntSecurity.cs
- BitmapEffect.cs
- BitmapDownload.cs
- UserControl.cs
- InstanceHandleReference.cs
- WindowsAltTab.cs
- MainMenu.cs
- NegotiationTokenAuthenticator.cs
- OptimizedTemplateContentHelper.cs
- SR.cs
- ServiceMemoryGates.cs
- Exception.cs
- SelectManyQueryOperator.cs
- TrackingServices.cs
- TailCallAnalyzer.cs
- RequestQueryParser.cs
- SQLStringStorage.cs
- CodeDomSerializer.cs
- ReadOnlyDataSource.cs
- SubclassTypeValidator.cs
- MediaTimeline.cs
- SudsCommon.cs
- RequestCachingSection.cs
- RowToFieldTransformer.cs
- CompiledRegexRunnerFactory.cs
- RequiredFieldValidator.cs
- DesignTimeDataBinding.cs
- BrowserDefinition.cs
- ArrayMergeHelper.cs
- XmlQueryRuntime.cs
- Nodes.cs
- FlowDocumentPage.cs
- TypeDependencyAttribute.cs
- QilList.cs
- AdCreatedEventArgs.cs
- MILUtilities.cs
- CodeEventReferenceExpression.cs
- DataBinding.cs
- BitConverter.cs
- BaseDataBoundControl.cs
- DuplexChannel.cs
- ContentControl.cs
- XmlILStorageConverter.cs
- RealizationContext.cs
- MessageBox.cs
- TextBounds.cs
- TimeoutException.cs
- DeferredSelectedIndexReference.cs
- NavigationPropertyEmitter.cs
- _FtpDataStream.cs
- OrthographicCamera.cs
- RouteItem.cs
- ConnectionInterfaceCollection.cs
- Int32KeyFrameCollection.cs
- securitycriticaldata.cs
- CompositeCollection.cs