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
- ListSortDescriptionCollection.cs
- CorrelationTokenInvalidatedHandler.cs
- _NegoStream.cs
- BrowserCapabilitiesFactory.cs
- PageCodeDomTreeGenerator.cs
- TimeZone.cs
- SemanticResultValue.cs
- XsltArgumentList.cs
- DataTablePropertyDescriptor.cs
- StoreItemCollection.Loader.cs
- DashStyle.cs
- ElementNotEnabledException.cs
- XmlSchemaComplexType.cs
- securitycriticaldataformultiplegetandset.cs
- ModuleBuilder.cs
- MetadataImporterQuotas.cs
- ChangePasswordDesigner.cs
- AsymmetricAlgorithm.cs
- QilName.cs
- ArrangedElementCollection.cs
- DataBoundLiteralControl.cs
- DataContract.cs
- URLBuilder.cs
- StylusSystemGestureEventArgs.cs
- Clock.cs
- ToolStripItemCollection.cs
- RawStylusInputCustomDataList.cs
- EndpointConfigContainer.cs
- CodeMemberField.cs
- Vector3DAnimationBase.cs
- ColumnResizeUndoUnit.cs
- ZipPackagePart.cs
- SystemColorTracker.cs
- SingleConverter.cs
- XmlUtil.cs
- RemoteWebConfigurationHostStream.cs
- PasswordBoxAutomationPeer.cs
- ErrorTolerantObjectWriter.cs
- Vector3DAnimation.cs
- ScrollContentPresenter.cs
- ToolStripManager.cs
- InheritedPropertyDescriptor.cs
- InkCollectionBehavior.cs
- DbDeleteCommandTree.cs
- InputBinding.cs
- MessagePartDescriptionCollection.cs
- Documentation.cs
- RootBrowserWindowAutomationPeer.cs
- UnsafeNativeMethods.cs
- DeferredTextReference.cs
- FamilyCollection.cs
- TextEndOfSegment.cs
- DataGridPagerStyle.cs
- Configuration.cs
- EdmProperty.cs
- Point4D.cs
- RuleInfoComparer.cs
- TargetFrameworkAttribute.cs
- OleDbRowUpdatingEvent.cs
- SetUserPreferenceRequest.cs
- Span.cs
- UInt16Storage.cs
- UntrustedRecipientException.cs
- HttpWebRequestElement.cs
- MemberInfoSerializationHolder.cs
- CodeParameterDeclarationExpressionCollection.cs
- BrowserCapabilitiesCodeGenerator.cs
- ImageSource.cs
- pingexception.cs
- SpeechAudioFormatInfo.cs
- InertiaExpansionBehavior.cs
- InvalidOleVariantTypeException.cs
- ModelItemDictionaryImpl.cs
- ParserContext.cs
- nulltextnavigator.cs
- ListItemParagraph.cs
- DynamicResourceExtension.cs
- AnnotationResourceCollection.cs
- SafeRegistryHandle.cs
- EntitySqlQueryBuilder.cs
- DiscoveryDocumentReference.cs
- CodeCommentStatement.cs
- ItemAutomationPeer.cs
- RequestStatusBarUpdateEventArgs.cs
- RadioButton.cs
- InfiniteIntConverter.cs
- PropertyStore.cs
- DateTimeConstantAttribute.cs
- Repeater.cs
- FileClassifier.cs
- XamlReader.cs
- UseAttributeSetsAction.cs
- ExpressionVisitor.cs
- ScrollProviderWrapper.cs
- ConnectionPoolManager.cs
- TreeNodeClickEventArgs.cs
- BuildProvider.cs
- HandledEventArgs.cs
- StylusEditingBehavior.cs
- TrustLevelCollection.cs