Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- XslCompiledTransform.cs
- DataPagerFieldCollection.cs
- X509AudioLogo.cs
- Context.cs
- XmlSchemaFacet.cs
- ClientRoleProvider.cs
- TextTreeNode.cs
- BufferAllocator.cs
- AccessDataSourceView.cs
- SolidColorBrush.cs
- Function.cs
- PageCatalogPart.cs
- BreadCrumbTextConverter.cs
- FormatterConverter.cs
- BufferedReadStream.cs
- EventProviderClassic.cs
- ServiceOperationParameter.cs
- WindowsScroll.cs
- CacheSection.cs
- PageParserFilter.cs
- UInt64.cs
- HttpProfileBase.cs
- IISUnsafeMethods.cs
- ByteKeyFrameCollection.cs
- ResourceWriter.cs
- SecurityTokenAttachmentMode.cs
- EntityDataSourceState.cs
- PublishLicense.cs
- EntityStoreSchemaGenerator.cs
- ActivityValidator.cs
- TargetFrameworkAttribute.cs
- PropertyCondition.cs
- StoreItemCollection.Loader.cs
- StyleXamlTreeBuilder.cs
- Msec.cs
- ImageCodecInfoPrivate.cs
- CacheSection.cs
- AVElementHelper.cs
- loginstatus.cs
- Scene3D.cs
- _RequestCacheProtocol.cs
- CodeDOMProvider.cs
- ResXResourceWriter.cs
- DesignerDataSchemaClass.cs
- SqlClientFactory.cs
- baseshape.cs
- FixedPageProcessor.cs
- FontFamilyValueSerializer.cs
- OutputWindow.cs
- DataGridViewTopLeftHeaderCell.cs
- CompressEmulationStream.cs
- TransformerTypeCollection.cs
- WmlValidatorAdapter.cs
- OnOperation.cs
- MetadataPropertyCollection.cs
- iisPickupDirectory.cs
- CustomPopupPlacement.cs
- StylusPointProperties.cs
- BCryptSafeHandles.cs
- SqlUnionizer.cs
- AddInAdapter.cs
- FormViewUpdateEventArgs.cs
- XmlBaseReader.cs
- Pkcs9Attribute.cs
- adornercollection.cs
- RelatedPropertyManager.cs
- Command.cs
- Matrix3D.cs
- CommonObjectSecurity.cs
- BaseComponentEditor.cs
- HMACSHA256.cs
- ExpressionConverter.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- RayMeshGeometry3DHitTestResult.cs
- datacache.cs
- DetailsViewInsertEventArgs.cs
- ApplicationSecurityManager.cs
- RtfToken.cs
- CompilerParameters.cs
- DataBinder.cs
- MediaScriptCommandRoutedEventArgs.cs
- InkSerializer.cs
- PrintControllerWithStatusDialog.cs
- TdsParserHelperClasses.cs
- HttpRequestCacheValidator.cs
- PropertyEntry.cs
- ConsumerConnectionPointCollection.cs
- CodeComment.cs
- DataGridViewCell.cs
- BookmarkWorkItem.cs
- CompatibleComparer.cs
- RoleGroupCollection.cs
- RoutedPropertyChangedEventArgs.cs
- HorizontalAlignConverter.cs
- LoginStatusDesigner.cs
- complextypematerializer.cs
- SecurityContextTokenCache.cs
- MediaContextNotificationWindow.cs
- QuaternionRotation3D.cs
- ToolStripPanelRow.cs