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
- GradientStop.cs
- ProfileServiceManager.cs
- EncryptedReference.cs
- SQLCharsStorage.cs
- AssemblyBuilderData.cs
- MatrixAnimationUsingPath.cs
- RangeBase.cs
- Transform.cs
- ReturnValue.cs
- BitmapDecoder.cs
- FixedSchema.cs
- MenuAdapter.cs
- NameValueConfigurationElement.cs
- EventLog.cs
- MethodRental.cs
- DbProviderManifest.cs
- UIElementParaClient.cs
- NamespaceList.cs
- SmtpReplyReaderFactory.cs
- AppDomainProtocolHandler.cs
- GradientStop.cs
- OneToOneMappingSerializer.cs
- TextTabProperties.cs
- InvalidEnumArgumentException.cs
- TrustVersion.cs
- DbConvert.cs
- WebPartsPersonalizationAuthorization.cs
- DbProviderManifest.cs
- SqlReorderer.cs
- HwndHost.cs
- COM2IPerPropertyBrowsingHandler.cs
- JavaScriptObjectDeserializer.cs
- TypeReference.cs
- Query.cs
- FixedSOMTable.cs
- WCFBuildProvider.cs
- ZipPackagePart.cs
- MenuScrollingVisibilityConverter.cs
- SqlCacheDependency.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- XsdBuildProvider.cs
- DeviceContext.cs
- CaseInsensitiveComparer.cs
- ManagementExtension.cs
- MonthChangedEventArgs.cs
- TreeNodeBinding.cs
- Graphics.cs
- CodeEntryPointMethod.cs
- UriPrefixTable.cs
- DataRowComparer.cs
- AppSettings.cs
- ConnectorMovedEventArgs.cs
- ReferencedType.cs
- InternalsVisibleToAttribute.cs
- TableLayoutColumnStyleCollection.cs
- _SslStream.cs
- Group.cs
- BamlLocalizationDictionary.cs
- FlagsAttribute.cs
- Hyperlink.cs
- ObjectListField.cs
- IResourceProvider.cs
- ElementMarkupObject.cs
- ConfigurationSchemaErrors.cs
- EventWaitHandleSecurity.cs
- TypeExtensionSerializer.cs
- Path.cs
- DataGridCaption.cs
- AppDomainUnloadedException.cs
- DataGridViewLayoutData.cs
- ThicknessAnimationUsingKeyFrames.cs
- ReadOnlyPropertyMetadata.cs
- DesignTimeParseData.cs
- XmlHierarchicalEnumerable.cs
- FlatButtonAppearance.cs
- TraceHwndHost.cs
- XhtmlTextWriter.cs
- LineServicesCallbacks.cs
- XmlExtensionFunction.cs
- IUnknownConstantAttribute.cs
- FormatterConverter.cs
- WebBrowserEvent.cs
- MachineKeySection.cs
- GetCryptoTransformRequest.cs
- OleDbWrapper.cs
- AudioDeviceOut.cs
- SessionEndedEventArgs.cs
- ChooseAction.cs
- SchemaInfo.cs
- IntellisenseTextBox.cs
- MediaTimeline.cs
- BinaryWriter.cs
- IntegerValidator.cs
- Point3DIndependentAnimationStorage.cs
- StorageRoot.cs
- CellIdBoolean.cs
- ExceptionUtility.cs
- QilFunction.cs
- XmlQueryType.cs
- DefaultBindingPropertyAttribute.cs