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
- ReferenceSchema.cs
- IntegerCollectionEditor.cs
- ProcessInputEventArgs.cs
- SoundPlayerAction.cs
- FileFormatException.cs
- HttpChannelListener.cs
- ContentTypeSettingClientMessageFormatter.cs
- HttpStreamMessage.cs
- MenuItem.cs
- Utils.cs
- AtomParser.cs
- TagPrefixInfo.cs
- ApplicationFileParser.cs
- SimpleApplicationHost.cs
- diagnosticsswitches.cs
- SocketException.cs
- ConfigurationSectionHelper.cs
- CodePrimitiveExpression.cs
- ExceptionValidationRule.cs
- TransformerInfo.cs
- TraceEventCache.cs
- StrokeNode.cs
- CustomLineCap.cs
- HandleRef.cs
- COM2PropertyDescriptor.cs
- XsltLibrary.cs
- TextAction.cs
- ContentPropertyAttribute.cs
- DataViewSetting.cs
- OpCopier.cs
- ReadContentAsBinaryHelper.cs
- LogFlushAsyncResult.cs
- DiscardableAttribute.cs
- Encoding.cs
- ASCIIEncoding.cs
- AxWrapperGen.cs
- DbParameterCollectionHelper.cs
- TagNameToTypeMapper.cs
- BitSet.cs
- RestHandler.cs
- SignatureResourcePool.cs
- SamlSubjectStatement.cs
- Base64Decoder.cs
- TextAction.cs
- SignedXmlDebugLog.cs
- ParameterExpression.cs
- DesignerAdapterAttribute.cs
- IriParsingElement.cs
- DataColumnCollection.cs
- InheritanceContextChangedEventManager.cs
- filewebrequest.cs
- NativeObjectSecurity.cs
- PageTheme.cs
- ContextMenu.cs
- StatusBarPanel.cs
- URLAttribute.cs
- Environment.cs
- LocalizedNameDescriptionPair.cs
- ConfigXmlText.cs
- LockedBorderGlyph.cs
- DesignerVerb.cs
- ConfigurationSectionHelper.cs
- ContainerActivationHelper.cs
- FamilyCollection.cs
- ActiveXSite.cs
- MethodBody.cs
- AbstractExpressions.cs
- TableItemPattern.cs
- RegexGroup.cs
- ToolStripSplitStackLayout.cs
- WebPartConnectionCollection.cs
- _DisconnectOverlappedAsyncResult.cs
- BinaryCommonClasses.cs
- DataObject.cs
- CommandDesigner.cs
- CodeTypeMember.cs
- BindingCompleteEventArgs.cs
- HideDisabledControlAdapter.cs
- LazyTextWriterCreator.cs
- WebServiceMethodData.cs
- SapiInterop.cs
- EventNotify.cs
- Slider.cs
- InlineCollection.cs
- Help.cs
- DocumentApplicationJournalEntry.cs
- _UriTypeConverter.cs
- AppDomainAttributes.cs
- InternalBufferManager.cs
- HttpCachePolicy.cs
- CodeRegionDirective.cs
- XamlTemplateSerializer.cs
- TypedTableGenerator.cs
- FormatSettings.cs
- CustomPopupPlacement.cs
- BaseInfoTable.cs
- SqlFileStream.cs
- DetailsViewPagerRow.cs
- WaitHandle.cs
- DataContractSet.cs