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
- ExeConfigurationFileMap.cs
- GregorianCalendar.cs
- FlagsAttribute.cs
- Translator.cs
- GeneralTransform2DTo3D.cs
- OracleCommandBuilder.cs
- MetricEntry.cs
- WebPartDisplayMode.cs
- XmlEncodedRawTextWriter.cs
- SqlNotificationEventArgs.cs
- complextypematerializer.cs
- ClientConvert.cs
- Label.cs
- OracleMonthSpan.cs
- TextBoxAutoCompleteSourceConverter.cs
- PassportAuthentication.cs
- RawStylusInputCustomData.cs
- RuntimeResourceSet.cs
- TimeSpanFormat.cs
- PropertyNames.cs
- RsaSecurityTokenAuthenticator.cs
- CheckBox.cs
- EmptyStringExpandableObjectConverter.cs
- TypeConverterHelper.cs
- hebrewshape.cs
- AbstractExpressions.cs
- ArgumentNullException.cs
- VisualTreeHelper.cs
- DataGridViewHeaderCell.cs
- ControlIdConverter.cs
- UpdateInfo.cs
- CommonGetThemePartSize.cs
- DocumentViewer.cs
- SelectionHighlightInfo.cs
- AddInContractAttribute.cs
- X509Utils.cs
- DefaultSection.cs
- DocumentPageHost.cs
- StringInfo.cs
- IntPtr.cs
- FrameworkRichTextComposition.cs
- MimeFormatExtensions.cs
- UnsafeNativeMethods.cs
- RootBrowserWindowAutomationPeer.cs
- Debug.cs
- KeyValuePair.cs
- FileUtil.cs
- SqlVisitor.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- SelectionRange.cs
- InfiniteTimeSpanConverter.cs
- ReadOnlyDataSourceView.cs
- ExponentialEase.cs
- WebConfigurationManager.cs
- MsmqIntegrationBindingElement.cs
- ObjectDataSourceEventArgs.cs
- ComboBoxItem.cs
- safesecurityhelperavalon.cs
- ThreadAbortException.cs
- DataBindingList.cs
- MouseGesture.cs
- UniqueEventHelper.cs
- DataSourceSelectArguments.cs
- ImpersonationContext.cs
- SafeWaitHandle.cs
- StructuredCompositeActivityDesigner.cs
- SqlDataSourceSelectingEventArgs.cs
- Math.cs
- SqlBuffer.cs
- WebControlParameterProxy.cs
- XmlUnspecifiedAttribute.cs
- FormatException.cs
- SelectionEditingBehavior.cs
- InkCanvasFeedbackAdorner.cs
- SqlSelectStatement.cs
- QueryInterceptorAttribute.cs
- DbInsertCommandTree.cs
- SafeMemoryMappedViewHandle.cs
- XmlNodeList.cs
- PointAnimationUsingKeyFrames.cs
- HttpChannelFactory.cs
- IdentitySection.cs
- XslAst.cs
- RepeaterItem.cs
- QueryConverter.cs
- MetafileHeaderWmf.cs
- XhtmlBasicValidationSummaryAdapter.cs
- WindowPatternIdentifiers.cs
- StrokeSerializer.cs
- TemplateBindingExtension.cs
- XPathDescendantIterator.cs
- AssemblyNameProxy.cs
- QueryContinueDragEventArgs.cs
- DurableOperationAttribute.cs
- XmlIlGenerator.cs
- ConnectionOrientedTransportManager.cs
- FileSystemWatcher.cs
- ReflectionServiceProvider.cs
- JournalEntryListConverter.cs
- Mouse.cs