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
- BamlReader.cs
- SubtreeProcessor.cs
- CodeDomConfigurationHandler.cs
- TextFormatter.cs
- IPAddress.cs
- LabelEditEvent.cs
- DocumentPaginator.cs
- DataServiceContext.cs
- PrintingPermissionAttribute.cs
- BroadcastEventHelper.cs
- TypeConverterAttribute.cs
- MappingSource.cs
- PermissionSetEnumerator.cs
- UnsafeNativeMethodsTablet.cs
- XmlCharCheckingWriter.cs
- FormatSettings.cs
- FieldInfo.cs
- HMACRIPEMD160.cs
- ExclusiveTcpListener.cs
- Icon.cs
- TokenBasedSet.cs
- ResourceIDHelper.cs
- DebugView.cs
- ConnectorSelectionGlyph.cs
- HasCopySemanticsAttribute.cs
- HotCommands.cs
- SelfIssuedSamlTokenFactory.cs
- SiteMapSection.cs
- QueryConverter.cs
- CounterCreationData.cs
- HttpRequestMessageProperty.cs
- SpecialTypeDataContract.cs
- WebBrowser.cs
- VoiceObjectToken.cs
- WebEvents.cs
- TextTreeUndo.cs
- BufferedGraphicsManager.cs
- XmlReflectionImporter.cs
- IsolatedStorageFile.cs
- DiagnosticsConfiguration.cs
- DataReceivedEventArgs.cs
- Stylesheet.cs
- AutomationProperties.cs
- DbConnectionInternal.cs
- ViewValidator.cs
- ButtonStandardAdapter.cs
- DocumentEventArgs.cs
- TextTrailingCharacterEllipsis.cs
- DataServices.cs
- HtmlWindowCollection.cs
- EntityConnection.cs
- AssemblyBuilder.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- RectAnimationBase.cs
- DataGridCell.cs
- SHA256.cs
- RadioButton.cs
- Model3D.cs
- VisualTreeHelper.cs
- documentsequencetextpointer.cs
- Scalars.cs
- QueryableDataSourceEditData.cs
- MonthCalendar.cs
- SingleKeyFrameCollection.cs
- BitmapEffect.cs
- XmlSubtreeReader.cs
- XmlIncludeAttribute.cs
- TypeConverterHelper.cs
- safemediahandle.cs
- MenuItemBindingCollection.cs
- PerfProviderCollection.cs
- RowCache.cs
- GroupBoxAutomationPeer.cs
- MouseCaptureWithinProperty.cs
- ListBindingConverter.cs
- ImageMapEventArgs.cs
- EntityDataSource.cs
- OrderedDictionary.cs
- FileDialog_Vista.cs
- ThreadSafeList.cs
- WebHostUnsafeNativeMethods.cs
- OutputCacheProfile.cs
- XmlObjectSerializerReadContextComplexJson.cs
- Line.cs
- LoadItemsEventArgs.cs
- DBDataPermissionAttribute.cs
- SourceSwitch.cs
- FontStretchConverter.cs
- BitStack.cs
- CalendarDay.cs
- LineBreak.cs
- LogEntrySerializer.cs
- CursorInteropHelper.cs
- SerializationObjectManager.cs
- SqlParameter.cs
- TextServicesCompartmentEventSink.cs
- ConfigurationStrings.cs
- Sorting.cs
- coordinator.cs
- xmlsaver.cs