Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ArcSegment.cs
- TextParagraphCache.cs
- NumericUpDownAccelerationCollection.cs
- OdbcCommandBuilder.cs
- MethodBody.cs
- webclient.cs
- AbandonedMutexException.cs
- DataGridItemEventArgs.cs
- OneOfElement.cs
- GroupBoxAutomationPeer.cs
- RowToParametersTransformer.cs
- SmtpMail.cs
- SqlLiftIndependentRowExpressions.cs
- FieldBuilder.cs
- DefaultProfileManager.cs
- WebPart.cs
- ResourceDescriptionAttribute.cs
- Journal.cs
- BitmapDecoder.cs
- BamlRecordHelper.cs
- COM2EnumConverter.cs
- HttpCookieCollection.cs
- Base64Encoder.cs
- BasicKeyConstraint.cs
- ObjectStateManager.cs
- ItemAutomationPeer.cs
- InProcStateClientManager.cs
- TreeWalker.cs
- SendActivityDesignerTheme.cs
- StructuralObject.cs
- HMACRIPEMD160.cs
- StandardCommands.cs
- UncommonField.cs
- SimpleTypeResolver.cs
- TypeForwardedToAttribute.cs
- ActivitySurrogateSelector.cs
- ConnectorSelectionGlyph.cs
- AuthenticationManager.cs
- DateTimePicker.cs
- StyleBamlTreeBuilder.cs
- TextDecorationCollection.cs
- SignatureDescription.cs
- CallbackValidatorAttribute.cs
- XhtmlBasicListAdapter.cs
- adornercollection.cs
- EncodingDataItem.cs
- ArrayListCollectionBase.cs
- basecomparevalidator.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- PropertyCollection.cs
- DesignerSerializationVisibilityAttribute.cs
- externdll.cs
- SafeArrayRankMismatchException.cs
- ConnectionPoint.cs
- GridErrorDlg.cs
- DrawingBrush.cs
- ListView.cs
- ListViewCancelEventArgs.cs
- XdrBuilder.cs
- PageThemeCodeDomTreeGenerator.cs
- PackagingUtilities.cs
- ContextMenuStripActionList.cs
- DesignerVerb.cs
- SkinBuilder.cs
- ConfigurationStrings.cs
- WebPartDisplayModeCollection.cs
- UserUseLicenseDictionaryLoader.cs
- RowToParametersTransformer.cs
- GridViewDeleteEventArgs.cs
- XmlRootAttribute.cs
- KeyMatchBuilder.cs
- InputReportEventArgs.cs
- UnionCodeGroup.cs
- SelectionWordBreaker.cs
- PrivacyNoticeBindingElement.cs
- SoundPlayerAction.cs
- NonClientArea.cs
- ReceiveContext.cs
- SoapTypeAttribute.cs
- HGlobalSafeHandle.cs
- IxmlLineInfo.cs
- Encoder.cs
- XmlSchemaSimpleTypeUnion.cs
- HttpServerChannel.cs
- _SingleItemRequestCache.cs
- Error.cs
- Facet.cs
- EmptyCollection.cs
- WorkflowInstanceRecord.cs
- DupHandleConnectionReader.cs
- FacetValueContainer.cs
- Pen.cs
- HttpValueCollection.cs
- WindowsGraphics2.cs
- WebPartDisplayMode.cs
- AsymmetricKeyExchangeDeformatter.cs
- HtmlInputFile.cs
- NamespaceEmitter.cs
- DocumentPropertiesDialog.cs
- EnumerableCollectionView.cs