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
- ZipIOBlockManager.cs
- coordinator.cs
- WindowsTokenRoleProvider.cs
- FtpRequestCacheValidator.cs
- Table.cs
- EntityType.cs
- CallTemplateAction.cs
- ProviderSettingsCollection.cs
- HttpCachePolicy.cs
- COM2ColorConverter.cs
- EventLogger.cs
- XPathQueryGenerator.cs
- SmiMetaDataProperty.cs
- SingleConverter.cs
- ExceptionHandlers.cs
- XmlHelper.cs
- EntityCommand.cs
- FormsAuthentication.cs
- TreeNodeCollection.cs
- XmlSerializerAssemblyAttribute.cs
- WorkflowServiceHost.cs
- PerformanceCounterPermissionEntry.cs
- PriorityChain.cs
- EncryptedReference.cs
- Matrix3D.cs
- XsdBuildProvider.cs
- StructuredTypeEmitter.cs
- URIFormatException.cs
- SourceSwitch.cs
- X509CertificateStore.cs
- UiaCoreApi.cs
- ShowExpandedMultiValueConverter.cs
- DataSysAttribute.cs
- RTLAwareMessageBox.cs
- XPathMultyIterator.cs
- KeyProperty.cs
- PermissionListSet.cs
- CompiledQuery.cs
- FaultReasonText.cs
- Context.cs
- SimpleModelProvider.cs
- XhtmlTextWriter.cs
- PasswordBoxAutomationPeer.cs
- CodeBlockBuilder.cs
- CheckBoxDesigner.cs
- FacetDescription.cs
- ProcessModelInfo.cs
- TypeBrowser.xaml.cs
- CreatingCookieEventArgs.cs
- MULTI_QI.cs
- TypeDescriptor.cs
- CorrelationToken.cs
- TextUtf8RawTextWriter.cs
- LinqDataSourceInsertEventArgs.cs
- LineUtil.cs
- WpfKnownMember.cs
- XmlQueryStaticData.cs
- DataGridTextBoxColumn.cs
- TabPage.cs
- SafePointer.cs
- SelectedDatesCollection.cs
- MexHttpsBindingCollectionElement.cs
- AstNode.cs
- DebugView.cs
- Scene3D.cs
- SiteMapDataSourceView.cs
- TdsParameterSetter.cs
- DateBoldEvent.cs
- DataGridViewRowsAddedEventArgs.cs
- oledbmetadatacolumnnames.cs
- WebPartsSection.cs
- LoginView.cs
- RegexCaptureCollection.cs
- ModelUtilities.cs
- OutputBuffer.cs
- DefaultValidator.cs
- StateMachineSubscriptionManager.cs
- FileChangesMonitor.cs
- IsolationInterop.cs
- StylusCaptureWithinProperty.cs
- AmbientLight.cs
- SystemIPInterfaceProperties.cs
- DbDataAdapter.cs
- ContainerControl.cs
- FormViewDesigner.cs
- RoleBoolean.cs
- ListItemConverter.cs
- SecurityElement.cs
- NominalTypeEliminator.cs
- CatalogPartDesigner.cs
- List.cs
- RuntimeIdentifierPropertyAttribute.cs
- CategoryState.cs
- OutputCacheSettings.cs
- Hex.cs
- TraceRecords.cs
- RegularExpressionValidator.cs
- EditingScope.cs
- AutomationProperties.cs
- DataGridViewAddColumnDialog.cs