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
- Color.cs
- Rotation3DAnimation.cs
- ParserContext.cs
- XmlSchemaInferenceException.cs
- LinqToSqlWrapper.cs
- CipherData.cs
- WebPartUserCapability.cs
- NonBatchDirectoryCompiler.cs
- DBDataPermissionAttribute.cs
- KeyGestureConverter.cs
- ValueTypeFieldReference.cs
- StorageAssociationSetMapping.cs
- SystemKeyConverter.cs
- NativeCppClassAttribute.cs
- SortedList.cs
- MimeParameterWriter.cs
- ActionFrame.cs
- DataGridViewTextBoxCell.cs
- ConfigurationSettings.cs
- Attribute.cs
- ContentPropertyAttribute.cs
- Drawing.cs
- AttributeProviderAttribute.cs
- SID.cs
- URI.cs
- GenericEnumerator.cs
- RequestQueue.cs
- SHA256.cs
- ServiceBehaviorElement.cs
- WeakHashtable.cs
- ListItemsPage.cs
- Typography.cs
- EdmRelationshipRoleAttribute.cs
- UnmanagedMemoryStreamWrapper.cs
- RedirectionProxy.cs
- PropertyManager.cs
- XmlUtil.cs
- MethodBuilder.cs
- PropertyInfoSet.cs
- XmlEnumAttribute.cs
- AttributeProviderAttribute.cs
- EventProviderWriter.cs
- TouchesCapturedWithinProperty.cs
- Evaluator.cs
- WebPartTracker.cs
- ToolTip.cs
- DescendantBaseQuery.cs
- TabControlEvent.cs
- FileDialog.cs
- TrackingExtract.cs
- OptionUsage.cs
- COM2Properties.cs
- HtmlButton.cs
- LinkArea.cs
- CommandPlan.cs
- XmlnsDefinitionAttribute.cs
- ClientConvert.cs
- PasswordRecovery.cs
- LocalizationComments.cs
- UserValidatedEventArgs.cs
- FontCollection.cs
- ObsoleteAttribute.cs
- HtmlHistory.cs
- EventProviderWriter.cs
- AssemblyInfo.cs
- MetadataCacheItem.cs
- WebPartCatalogAddVerb.cs
- SimplePropertyEntry.cs
- FrameworkName.cs
- DesignerUtility.cs
- PerformanceCounterPermission.cs
- CodeGotoStatement.cs
- ObjectCache.cs
- HttpProcessUtility.cs
- baseshape.cs
- DefaultTraceListener.cs
- ValidatedControlConverter.cs
- HttpValueCollection.cs
- KeyConverter.cs
- ManagedFilter.cs
- EditorZoneBase.cs
- CheckedListBox.cs
- DateTimePicker.cs
- NameValueFileSectionHandler.cs
- LassoHelper.cs
- X509Certificate.cs
- _SpnDictionary.cs
- TextCharacters.cs
- ActivationArguments.cs
- CollectionEditorDialog.cs
- NegotiationTokenProvider.cs
- DataServiceRequest.cs
- RotationValidation.cs
- ClientTargetSection.cs
- Fonts.cs
- RectConverter.cs
- ProxyGenerator.cs
- HttpVersion.cs
- MouseGesture.cs
- _AcceptOverlappedAsyncResult.cs