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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- VectorCollection.cs
- RawKeyboardInputReport.cs
- IndexingContentUnit.cs
- BamlLocalizer.cs
- CustomTypeDescriptor.cs
- _BaseOverlappedAsyncResult.cs
- fixedPageContentExtractor.cs
- XmlNamedNodeMap.cs
- Path.cs
- EventLogger.cs
- SendKeys.cs
- WebPartDisplayModeCollection.cs
- CatalogZone.cs
- SqlServer2KCompatibilityCheck.cs
- CallbackWrapper.cs
- HtmlControlPersistable.cs
- XsltSettings.cs
- TimerExtension.cs
- Rotation3D.cs
- CodeAttributeArgument.cs
- FragmentQueryProcessor.cs
- WindowsScroll.cs
- Header.cs
- PasswordRecovery.cs
- InvalidOperationException.cs
- ContentElement.cs
- UnsafeNetInfoNativeMethods.cs
- ParserContext.cs
- XamlTypeMapper.cs
- DateTimeFormat.cs
- MasterPageBuildProvider.cs
- DatagridviewDisplayedBandsData.cs
- VisualStyleRenderer.cs
- IconConverter.cs
- PagerSettings.cs
- DataSourceHelper.cs
- VirtualizingStackPanel.cs
- StyleSheetComponentEditor.cs
- SafeRightsManagementSessionHandle.cs
- Monitor.cs
- GridSplitterAutomationPeer.cs
- AssertSection.cs
- TextWriterEngine.cs
- EventSetter.cs
- xml.cs
- PackUriHelper.cs
- ScrollChrome.cs
- DbCommandTree.cs
- TableRow.cs
- XPathQilFactory.cs
- AssemblyFilter.cs
- MsmqChannelFactoryBase.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- InlineCategoriesDocument.cs
- CheckBoxPopupAdapter.cs
- NetworkInterface.cs
- Converter.cs
- MenuItem.cs
- RankException.cs
- WorkflowStateRollbackService.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- XmlMessageFormatter.cs
- DataColumnCollection.cs
- DrawingGroup.cs
- MultiAsyncResult.cs
- OrderedHashRepartitionStream.cs
- SystemIPv4InterfaceProperties.cs
- Operators.cs
- ButtonDesigner.cs
- OpCodes.cs
- RoutedEventConverter.cs
- SecurityElement.cs
- EventSinkActivity.cs
- ManualWorkflowSchedulerService.cs
- SmiContextFactory.cs
- ScriptComponentDescriptor.cs
- TimeSpanValidator.cs
- BigIntegerStorage.cs
- ActiveXHelper.cs
- StringHandle.cs
- _NegoState.cs
- XmlNamespaceMapping.cs
- SynchronousSendBindingElement.cs
- CustomSignedXml.cs
- NetNamedPipeSecurityMode.cs
- COM2FontConverter.cs
- SqlWorkflowPersistenceService.cs
- TabRenderer.cs
- DataViewSetting.cs
- DataList.cs
- TextEditorCharacters.cs
- AsyncPostBackErrorEventArgs.cs
- ToolStripContentPanel.cs
- ObjectListDataBindEventArgs.cs
- MLangCodePageEncoding.cs
- RadioButtonPopupAdapter.cs
- TraceData.cs
- WriteFileContext.cs
- SqlCharStream.cs
- TableCell.cs