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
- CollectionBase.cs
- ZoneButton.cs
- ResponseStream.cs
- FormsAuthentication.cs
- ObjectViewFactory.cs
- SqlSelectStatement.cs
- _ListenerResponseStream.cs
- PropertyGridView.cs
- InputDevice.cs
- PropertySourceInfo.cs
- Menu.cs
- AlternateView.cs
- DataGridViewColumnEventArgs.cs
- ThemeableAttribute.cs
- BooleanSwitch.cs
- TextureBrush.cs
- Light.cs
- InternalsVisibleToAttribute.cs
- Gdiplus.cs
- TriggerActionCollection.cs
- XhtmlStyleClass.cs
- UnsafeNativeMethods.cs
- TextEffect.cs
- ParameterToken.cs
- BuilderElements.cs
- MenuItemStyleCollectionEditor.cs
- ColorTranslator.cs
- CalendarDateRangeChangingEventArgs.cs
- ChannelManager.cs
- IntegerFacetDescriptionElement.cs
- Select.cs
- XsdDuration.cs
- DataGridViewRowHeaderCell.cs
- WSUtilitySpecificationVersion.cs
- DebugView.cs
- RepeaterItem.cs
- WebPartConnectionsCancelEventArgs.cs
- Model3DCollection.cs
- BrowserInteropHelper.cs
- ForEachDesigner.xaml.cs
- SoapReflectionImporter.cs
- ShaperBuffers.cs
- InstanceData.cs
- ParameterToken.cs
- XPathNavigatorReader.cs
- FunctionImportMapping.cs
- SmtpNetworkElement.cs
- DbTypeMap.cs
- compensatingcollection.cs
- EntityDataSourceDesigner.cs
- WinCategoryAttribute.cs
- SchemaComplexType.cs
- ColumnHeaderConverter.cs
- Buffer.cs
- SourceFileBuildProvider.cs
- ZipIOExtraFieldZip64Element.cs
- DiscoveryClientDuplexChannel.cs
- DataControlFieldTypeEditor.cs
- FixedSOMContainer.cs
- ObjectViewQueryResultData.cs
- ObjectQuery.cs
- TCPListener.cs
- MainMenu.cs
- VoiceChangeEventArgs.cs
- ImageMapEventArgs.cs
- SslStream.cs
- OrderedDictionaryStateHelper.cs
- CacheForPrimitiveTypes.cs
- AnyAllSearchOperator.cs
- AnalyzedTree.cs
- FacetEnabledSchemaElement.cs
- WebMessageEncodingBindingElement.cs
- FormViewInsertEventArgs.cs
- TextParentUndoUnit.cs
- VersionUtil.cs
- XmlUtil.cs
- TextServicesCompartmentContext.cs
- TreeViewDesigner.cs
- ConstraintEnumerator.cs
- EmptyStringExpandableObjectConverter.cs
- DataGridItemCollection.cs
- NotifyIcon.cs
- RelOps.cs
- DataGridRowEventArgs.cs
- ListViewUpdatedEventArgs.cs
- XNodeValidator.cs
- ColorIndependentAnimationStorage.cs
- XpsFontSubsetter.cs
- MarshalByValueComponent.cs
- followingquery.cs
- DesignerForm.cs
- TextEditorMouse.cs
- DashStyle.cs
- URL.cs
- ObjectStateFormatter.cs
- FlatButtonAppearance.cs
- CodeAttributeDeclaration.cs
- DocumentPageView.cs
- HostProtectionPermission.cs
- DBParameter.cs