Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Base / MS / Internal / NamedObject.cs / 1 / NamedObject.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: Placeholder object, with a name that appears in the debugger // //--------------------------------------------------------------------------- using System; using System.Globalization; using MS.Internal.WindowsBase; namespace MS.Internal { ////// An instance of this class can be used wherever you might otherwise use /// "new Object()". The name will show up in the debugger, instead of /// merely "{object}" /// [FriendAccessAllowed] // Built into Base, also used by Framework. internal class NamedObject { public NamedObject(string name) { if (String.IsNullOrEmpty(name)) throw new ArgumentNullException(name); _name = name; } public override string ToString() { if (_name[0] != '{') { // lazily add {} around the name, to avoid allocating a string // until it's actually needed _name = String.Format(CultureInfo.InvariantCulture, "{{{0}}}", _name); } return _name; } string _name; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ClientBuildManagerCallback.cs
- ToolStripItemEventArgs.cs
- PolyQuadraticBezierSegment.cs
- DateTimeValueSerializer.cs
- IdentityVerifier.cs
- ListViewCommandEventArgs.cs
- ReliableChannelBinder.cs
- ColumnResult.cs
- EnvelopedPkcs7.cs
- UInt32Storage.cs
- CellCreator.cs
- HostnameComparisonMode.cs
- RegexParser.cs
- RepeatButton.cs
- IProvider.cs
- CqlErrorHelper.cs
- Version.cs
- WebPartDescriptionCollection.cs
- GregorianCalendarHelper.cs
- DynamicValueConverter.cs
- ClickablePoint.cs
- Inline.cs
- Atom10FormatterFactory.cs
- SessionStateModule.cs
- StylusPointProperties.cs
- TableCellAutomationPeer.cs
- FontUnit.cs
- DataSysAttribute.cs
- RoutedEventArgs.cs
- xmlsaver.cs
- MessageSmuggler.cs
- Storyboard.cs
- TextPointerBase.cs
- StorageMappingItemLoader.cs
- KoreanCalendar.cs
- AesCryptoServiceProvider.cs
- GatewayIPAddressInformationCollection.cs
- XomlDesignerLoader.cs
- DeploymentSectionCache.cs
- XmlCharacterData.cs
- ImportContext.cs
- AnimationStorage.cs
- CriticalHandle.cs
- OutputCacheEntry.cs
- EventRoute.cs
- BamlResourceSerializer.cs
- UpdatePanel.cs
- CalendarDesigner.cs
- HatchBrush.cs
- TailPinnedEventArgs.cs
- SystemIPGlobalProperties.cs
- ProjectedSlot.cs
- DataReaderContainer.cs
- RequestCachingSection.cs
- OleAutBinder.cs
- ComponentCollection.cs
- SqlDelegatedTransaction.cs
- MenuCommand.cs
- DecimalAnimationUsingKeyFrames.cs
- DrawingImage.cs
- FrameworkRichTextComposition.cs
- MemberInfoSerializationHolder.cs
- OrthographicCamera.cs
- XPathItem.cs
- DatePickerTextBox.cs
- InkSerializer.cs
- XmlAtomErrorReader.cs
- PartManifestEntry.cs
- ProfileServiceManager.cs
- WindowsGrip.cs
- WebPartVerb.cs
- CatalogZone.cs
- PeerInvitationResponse.cs
- AppSettingsReader.cs
- DurableServiceAttribute.cs
- LoadRetryHandler.cs
- SchemaImporterExtensionElementCollection.cs
- XmlSchemaValidator.cs
- ElementHostPropertyMap.cs
- RightsDocument.cs
- ParsedAttributeCollection.cs
- TraversalRequest.cs
- DependencyPropertyConverter.cs
- TextOutput.cs
- SiteMapDataSource.cs
- HttpMethodAttribute.cs
- RouteParser.cs
- SecurityPolicySection.cs
- Transform.cs
- LicenseException.cs
- FormViewCommandEventArgs.cs
- MsmqDecodeHelper.cs
- ViewCellRelation.cs
- Application.cs
- SqlCacheDependencySection.cs
- RemoteWebConfigurationHost.cs
- HtmlInputCheckBox.cs
- DockPattern.cs
- XPathParser.cs
- ElementMarkupObject.cs