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
- QilLiteral.cs
- SplitContainer.cs
- LongValidatorAttribute.cs
- TemplatePartAttribute.cs
- UnsafeNativeMethods.cs
- RC2.cs
- ChooseAction.cs
- WebPageTraceListener.cs
- CroppedBitmap.cs
- ColorKeyFrameCollection.cs
- BlockCollection.cs
- AspProxy.cs
- GridViewRowCollection.cs
- InstancePersistenceContext.cs
- ActivityExecutorDelegateInfo.cs
- WebPartDisplayMode.cs
- LineVisual.cs
- JsonWriterDelegator.cs
- SchemaObjectWriter.cs
- HierarchicalDataSourceControl.cs
- CollectionEditorDialog.cs
- TextElement.cs
- ProvidePropertyAttribute.cs
- Knowncolors.cs
- SearchExpression.cs
- PropertyItem.cs
- ErrorEventArgs.cs
- XmlTextWriter.cs
- TemplateKeyConverter.cs
- FilterQuery.cs
- DataViewSetting.cs
- MatrixCamera.cs
- GiveFeedbackEventArgs.cs
- SQLInt32Storage.cs
- FixedHyperLink.cs
- BaseDataList.cs
- ParentUndoUnit.cs
- InternalControlCollection.cs
- SqlClientMetaDataCollectionNames.cs
- Annotation.cs
- GridSplitterAutomationPeer.cs
- HashCodeCombiner.cs
- IpcChannel.cs
- ServiceOperation.cs
- PageWrapper.cs
- SqlConnectionPoolGroupProviderInfo.cs
- TypeAccessException.cs
- CultureNotFoundException.cs
- ToolboxCategoryItems.cs
- HostingEnvironmentWrapper.cs
- AtomPub10ServiceDocumentFormatter.cs
- Thumb.cs
- ErrorTableItemStyle.cs
- ColumnResizeUndoUnit.cs
- ParagraphVisual.cs
- EntityDataSourceSelectingEventArgs.cs
- XamlSerializerUtil.cs
- RawTextInputReport.cs
- Int32KeyFrameCollection.cs
- HttpModuleActionCollection.cs
- ToolStripItemClickedEventArgs.cs
- TransformProviderWrapper.cs
- XslTransform.cs
- Line.cs
- CodeCommentStatementCollection.cs
- XmlC14NWriter.cs
- XmlArrayItemAttribute.cs
- UseLicense.cs
- ObfuscateAssemblyAttribute.cs
- FormClosingEvent.cs
- AssemblyHelper.cs
- StyleModeStack.cs
- SQLDecimalStorage.cs
- FastEncoderWindow.cs
- WorkItem.cs
- CodeFieldReferenceExpression.cs
- TypeForwardedToAttribute.cs
- SqlWebEventProvider.cs
- RijndaelManagedTransform.cs
- DuplicateWaitObjectException.cs
- ButtonColumn.cs
- XmlTextWriter.cs
- StructuredTypeInfo.cs
- MetadataItem.cs
- SoapReflectionImporter.cs
- ModelUtilities.cs
- AnnotationService.cs
- RawStylusActions.cs
- RsaSecurityKey.cs
- DbExpressionVisitor_TResultType.cs
- BooleanExpr.cs
- ChameleonKey.cs
- ErrorFormatter.cs
- Animatable.cs
- ITreeGenerator.cs
- FilteredDataSetHelper.cs
- TrackingProfileCache.cs
- NativeMethods.cs
- CodeAccessSecurityEngine.cs
- XmlNodeReader.cs