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
- Facet.cs
- SaveFileDialog.cs
- HtmlHead.cs
- SchemaName.cs
- WebPartUserCapability.cs
- ServiceModelReg.cs
- WebPartZone.cs
- XmlSchemaInfo.cs
- COSERVERINFO.cs
- GeometryGroup.cs
- SourceFilter.cs
- LiteralText.cs
- EmptyEnumerator.cs
- PerformanceCountersElement.cs
- Converter.cs
- PrintDocument.cs
- SoapExtensionTypeElementCollection.cs
- DesignerCategoryAttribute.cs
- DockPattern.cs
- TemplateComponentConnector.cs
- MaskDesignerDialog.cs
- ControlBuilder.cs
- TCPClient.cs
- AspCompat.cs
- CheckedListBox.cs
- BlurEffect.cs
- TabletDevice.cs
- ResourceDisplayNameAttribute.cs
- IndependentlyAnimatedPropertyMetadata.cs
- DecimalKeyFrameCollection.cs
- ListViewDeleteEventArgs.cs
- SimpleWorkerRequest.cs
- QilInvoke.cs
- DeclarativeCatalogPartDesigner.cs
- SchemaMerger.cs
- FlowLayout.cs
- LineGeometry.cs
- RemoteWebConfigurationHostStream.cs
- PriorityItem.cs
- PropertyIDSet.cs
- StringKeyFrameCollection.cs
- DocumentViewerBaseAutomationPeer.cs
- DataGridRelationshipRow.cs
- MsmqIntegrationSecurityMode.cs
- ConnectivityStatus.cs
- ObjectDataSourceMethodEditor.cs
- UrlMappingCollection.cs
- TraceLevelStore.cs
- TabletDeviceInfo.cs
- UIAgentMonitorHandle.cs
- ContentHostHelper.cs
- MouseGesture.cs
- FreezableDefaultValueFactory.cs
- FormViewUpdateEventArgs.cs
- DefaultValueAttribute.cs
- DataServices.cs
- CommandID.cs
- StorageMappingItemLoader.cs
- DashStyle.cs
- ByteRangeDownloader.cs
- XpsViewerException.cs
- SQLSingleStorage.cs
- prompt.cs
- Quack.cs
- OrderPreservingPipeliningMergeHelper.cs
- InternalConfigConfigurationFactory.cs
- OpacityConverter.cs
- WmfPlaceableFileHeader.cs
- MaskedTextBoxDesignerActionList.cs
- DataGridColumnStyleMappingNameEditor.cs
- ClaimComparer.cs
- DataGridViewCellStyleConverter.cs
- Schema.cs
- BindableTemplateBuilder.cs
- XmlLangPropertyAttribute.cs
- CultureInfo.cs
- DBNull.cs
- Context.cs
- CompiledQueryCacheKey.cs
- MenuItemBinding.cs
- GeneralTransform2DTo3D.cs
- LogRecordSequence.cs
- ParagraphResult.cs
- TextProviderWrapper.cs
- State.cs
- _NTAuthentication.cs
- TypeSystem.cs
- NopReturnReader.cs
- OracleRowUpdatedEventArgs.cs
- EditorResources.cs
- NameTable.cs
- PrintController.cs
- UserInitiatedNavigationPermission.cs
- RoutedEvent.cs
- Pair.cs
- DefaultPropertyAttribute.cs
- TextOnlyOutput.cs
- CardSpacePolicyElement.cs
- AllMembershipCondition.cs
- SecurityContext.cs