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
- GridLengthConverter.cs
- Scheduler.cs
- ParentUndoUnit.cs
- UidManager.cs
- DataKey.cs
- ConfigXmlComment.cs
- Native.cs
- RenamedEventArgs.cs
- PackageProperties.cs
- ReliableRequestSessionChannel.cs
- QilStrConcatenator.cs
- RijndaelManaged.cs
- WindowsStatusBar.cs
- mediaeventargs.cs
- DBBindings.cs
- XmlSchemaCollection.cs
- SynchronizationContext.cs
- FontCollection.cs
- OletxCommittableTransaction.cs
- FormatVersion.cs
- ProxyDataContractResolver.cs
- XmlSchemaRedefine.cs
- Vector3D.cs
- LiteralControl.cs
- SpanIndex.cs
- ParameterCollection.cs
- XmlQueryStaticData.cs
- ValueChangedEventManager.cs
- XmlSerializerNamespaces.cs
- DiagnosticsElement.cs
- TimerElapsedEvenArgs.cs
- Event.cs
- DataGridCheckBoxColumn.cs
- SyncOperationState.cs
- StyleTypedPropertyAttribute.cs
- OdbcConnectionHandle.cs
- GridViewSelectEventArgs.cs
- Point4D.cs
- BasicCellRelation.cs
- CSharpCodeProvider.cs
- WindowPatternIdentifiers.cs
- MembershipUser.cs
- TraceFilter.cs
- Constraint.cs
- WebServiceClientProxyGenerator.cs
- MemoryFailPoint.cs
- RelatedPropertyManager.cs
- TerminateSequence.cs
- ProxyWebPart.cs
- ControlBindingsCollection.cs
- FixedSOMContainer.cs
- DurationConverter.cs
- ProjectionRewriter.cs
- GPPOINTF.cs
- controlskin.cs
- ParameterCollection.cs
- UnionCodeGroup.cs
- XmlNamespaceMapping.cs
- InputManager.cs
- AffineTransform3D.cs
- NamedPermissionSet.cs
- ProviderMetadata.cs
- ContourSegment.cs
- Int64AnimationUsingKeyFrames.cs
- TaskCanceledException.cs
- UnitySerializationHolder.cs
- mansign.cs
- ChannelBinding.cs
- QilChoice.cs
- PreparingEnlistment.cs
- SqlRetyper.cs
- NaturalLanguageHyphenator.cs
- LinqDataSourceSelectEventArgs.cs
- ImageMap.cs
- DesignColumn.cs
- SafeNativeMethodsMilCoreApi.cs
- Button.cs
- Site.cs
- EpmContentSerializerBase.cs
- RadialGradientBrush.cs
- DesignerDataSourceView.cs
- AutoCompleteStringCollection.cs
- CounterSample.cs
- StringConcat.cs
- ControlValuePropertyAttribute.cs
- typedescriptorpermissionattribute.cs
- KeyPullup.cs
- WindowsGraphicsCacheManager.cs
- TypeConverterHelper.cs
- PrintDialogException.cs
- OracleBinary.cs
- _TransmitFileOverlappedAsyncResult.cs
- DBCommand.cs
- COM2EnumConverter.cs
- GridItemPattern.cs
- SimpleLine.cs
- ModifiableIteratorCollection.cs
- Debug.cs
- MouseGestureValueSerializer.cs
- DynamicValidatorEventArgs.cs