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
- ZipFileInfoCollection.cs
- Types.cs
- ApplicationFileCodeDomTreeGenerator.cs
- Aes.cs
- CacheVirtualItemsEvent.cs
- DataPointer.cs
- EnumUnknown.cs
- VectorConverter.cs
- StylusShape.cs
- SpanIndex.cs
- AssemblyCollection.cs
- WebPartVerbCollection.cs
- FileClassifier.cs
- DataColumnPropertyDescriptor.cs
- IdentityHolder.cs
- EncryptedPackage.cs
- TemplateBindingExtension.cs
- ConfigXmlSignificantWhitespace.cs
- RenderDataDrawingContext.cs
- TextElementAutomationPeer.cs
- SecUtil.cs
- CodeAssignStatement.cs
- TransactionException.cs
- SqlTriggerContext.cs
- LoadMessageLogger.cs
- DataRowExtensions.cs
- AsyncStreamReader.cs
- XmlSchemaAppInfo.cs
- ExpressionTable.cs
- InputScopeManager.cs
- XPathAxisIterator.cs
- ListViewEditEventArgs.cs
- FormViewPagerRow.cs
- UrlAuthorizationModule.cs
- MaskedTextBoxTextEditorDropDown.cs
- InputProcessorProfiles.cs
- VisualTreeUtils.cs
- PtsCache.cs
- externdll.cs
- LineGeometry.cs
- PartManifestEntry.cs
- HttpCapabilitiesSectionHandler.cs
- HGlobalSafeHandle.cs
- Command.cs
- Policy.cs
- BinaryOperationBinder.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- DNS.cs
- ViewStateModeByIdAttribute.cs
- WindowsListView.cs
- Nullable.cs
- QueryTask.cs
- RuntimeEnvironment.cs
- ImageInfo.cs
- EditorBrowsableAttribute.cs
- EncoderReplacementFallback.cs
- HttpsChannelListener.cs
- ExitEventArgs.cs
- DataGridPagingPage.cs
- DataSourceConverter.cs
- Processor.cs
- TextElementEnumerator.cs
- ArraySortHelper.cs
- UserInitiatedRoutedEventPermission.cs
- HttpChannelBindingToken.cs
- _AutoWebProxyScriptHelper.cs
- TraceHwndHost.cs
- WindowsComboBox.cs
- XhtmlStyleClass.cs
- WmlMobileTextWriter.cs
- SendMailErrorEventArgs.cs
- BatchServiceHost.cs
- SoapUnknownHeader.cs
- SplayTreeNode.cs
- RegisterInfo.cs
- Message.cs
- InvalidWMPVersionException.cs
- RequestStatusBarUpdateEventArgs.cs
- SplitterEvent.cs
- IssuedTokenClientElement.cs
- StorageTypeMapping.cs
- SafeProcessHandle.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- WorkflowDataContext.cs
- XamlGridLengthSerializer.cs
- StylusPointProperty.cs
- ReceiveActivity.cs
- Constraint.cs
- TreeNodeBinding.cs
- RadialGradientBrush.cs
- SqlBuilder.cs
- HttpClientCertificate.cs
- NavigationPropertyEmitter.cs
- InfoCardBaseException.cs
- DependencyPropertyHelper.cs
- AccessibleObject.cs
- StorageEntityTypeMapping.cs
- DefaultAssemblyResolver.cs
- DockPanel.cs
- HttpValueCollection.cs