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
- ValueOfAction.cs
- ColumnReorderedEventArgs.cs
- GridViewDeleteEventArgs.cs
- AddInStore.cs
- AutoGeneratedFieldProperties.cs
- Light.cs
- BlurBitmapEffect.cs
- DataTable.cs
- Code.cs
- ProjectedSlot.cs
- PrintPreviewControl.cs
- BaseDataListDesigner.cs
- PopupRoot.cs
- RequestCachingSection.cs
- ContactManager.cs
- FileLoadException.cs
- TypeGeneratedEventArgs.cs
- FlowSwitchDesigner.xaml.cs
- ProcessManager.cs
- CompositeActivityTypeDescriptorProvider.cs
- WebPartUtil.cs
- GenericUriParser.cs
- LocationReference.cs
- UntrustedRecipientException.cs
- ApplicationActivator.cs
- SqlDataSourceSummaryPanel.cs
- AlternateView.cs
- XmlSchemaSequence.cs
- FlowDocumentView.cs
- TransformerTypeCollection.cs
- CatalogZoneBase.cs
- MenuItem.cs
- ProfileSettingsCollection.cs
- XmlSchemaAppInfo.cs
- CurrencyWrapper.cs
- XmlCountingReader.cs
- TableFieldsEditor.cs
- HandlerWithFactory.cs
- ProtocolsSection.cs
- DSACryptoServiceProvider.cs
- AssociationTypeEmitter.cs
- RoleBoolean.cs
- SqlAggregateChecker.cs
- ListViewItem.cs
- ProcessHostConfigUtils.cs
- SmtpException.cs
- WhereQueryOperator.cs
- SplitterEvent.cs
- HostedBindingBehavior.cs
- EntityCollection.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- TransformCryptoHandle.cs
- DataGridRowsPresenter.cs
- DbSource.cs
- FontDriver.cs
- TextEditorThreadLocalStore.cs
- SystemIPInterfaceStatistics.cs
- ProfilePropertyNameValidator.cs
- UniqueID.cs
- BookmarkManager.cs
- ToolboxComponentsCreatingEventArgs.cs
- FileEnumerator.cs
- TextTreeFixupNode.cs
- Brush.cs
- FontStretchConverter.cs
- Viewport3DVisual.cs
- StoryFragments.cs
- WindowPatternIdentifiers.cs
- TimeSpan.cs
- FileDetails.cs
- DispatcherEventArgs.cs
- ProtectedProviderSettings.cs
- RectKeyFrameCollection.cs
- RegionData.cs
- ConfigurationPermission.cs
- RuntimeHandles.cs
- EditingCoordinator.cs
- SBCSCodePageEncoding.cs
- IgnoreDeviceFilterElement.cs
- NumericUpDown.cs
- DependencyObject.cs
- DescendantBaseQuery.cs
- SQLString.cs
- PropertyMapper.cs
- InkPresenter.cs
- InstanceDataCollection.cs
- TypeBuilderInstantiation.cs
- HashJoinQueryOperatorEnumerator.cs
- ActivityContext.cs
- typedescriptorpermission.cs
- TableParaClient.cs
- VisualBrush.cs
- ValidationResult.cs
- CommandBindingCollection.cs
- CacheMemory.cs
- BinaryUtilClasses.cs
- ConnectionStringEditor.cs
- ModelChangedEventArgsImpl.cs
- ToolStripScrollButton.cs
- TemplateComponentConnector.cs