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
- Activity.cs
- FigureParaClient.cs
- XamlFxTrace.cs
- MouseOverProperty.cs
- DocumentApplicationJournalEntry.cs
- AppModelKnownContentFactory.cs
- UnsafeNativeMethods.cs
- RightsDocument.cs
- AttributeQuery.cs
- PropagatorResult.cs
- MutexSecurity.cs
- EntityCollection.cs
- FixedSOMPageConstructor.cs
- CodeLabeledStatement.cs
- ErrorCodes.cs
- SystemUnicastIPAddressInformation.cs
- Ref.cs
- ColorTransform.cs
- ExpressionDumper.cs
- ContentPropertyAttribute.cs
- TypedRowHandler.cs
- TableLayoutPanel.cs
- UnknownWrapper.cs
- XmlIterators.cs
- SqlDataSourceCache.cs
- OuterGlowBitmapEffect.cs
- MissingFieldException.cs
- SoapSchemaImporter.cs
- ComboBoxDesigner.cs
- StylusLogic.cs
- PathNode.cs
- EntitySqlQueryBuilder.cs
- ValidationErrorCollection.cs
- PenThreadWorker.cs
- AutomationElementCollection.cs
- HttpFormatExtensions.cs
- RemotingSurrogateSelector.cs
- dataobject.cs
- ILGenerator.cs
- BaseCodePageEncoding.cs
- PrePostDescendentsWalker.cs
- WindowsContainer.cs
- DataSourceViewSchemaConverter.cs
- LowerCaseStringConverter.cs
- XpsStructure.cs
- DrawingGroupDrawingContext.cs
- WindowsSpinner.cs
- Validator.cs
- RSAPKCS1KeyExchangeFormatter.cs
- Timer.cs
- QueryLifecycle.cs
- WebPartsPersonalization.cs
- CalculatedColumn.cs
- AppDomainUnloadedException.cs
- Profiler.cs
- PrintDialogException.cs
- ChangeTracker.cs
- DeadCharTextComposition.cs
- SqlWebEventProvider.cs
- ButtonBaseAutomationPeer.cs
- DesignerRegionMouseEventArgs.cs
- ScriptControlDescriptor.cs
- DataColumnMappingCollection.cs
- Model3D.cs
- QilInvokeEarlyBound.cs
- ReceiveCompletedEventArgs.cs
- TraceHandlerErrorFormatter.cs
- OleDbFactory.cs
- SendReply.cs
- UniqueID.cs
- ColumnCollection.cs
- DictionarySurrogate.cs
- SortKey.cs
- AmbientLight.cs
- followingquery.cs
- WorkflowService.cs
- RequestCachePolicy.cs
- BufferAllocator.cs
- login.cs
- Transform.cs
- CompositeControl.cs
- InitializationEventAttribute.cs
- SqlCommand.cs
- Formatter.cs
- DataGridPagerStyle.cs
- RoutedEventValueSerializer.cs
- SubstitutionList.cs
- FixedPosition.cs
- DoubleAnimation.cs
- EntityModelBuildProvider.cs
- LayeredChannelListener.cs
- CodeNamespace.cs
- MetafileHeader.cs
- WebDisplayNameAttribute.cs
- AnnotationMap.cs
- MessageBodyMemberAttribute.cs
- HttpPostLocalhostServerProtocol.cs
- AliasExpr.cs
- XmlDeclaration.cs
- messageonlyhwndwrapper.cs