Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / MS / Internal / NamedObject.cs / 1305600 / 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
- DrawingCollection.cs
- CultureMapper.cs
- RMPublishingDialog.cs
- RowToParametersTransformer.cs
- xmlglyphRunInfo.cs
- SystemIPGlobalStatistics.cs
- DataSourceView.cs
- SEHException.cs
- CFStream.cs
- ProtectedConfigurationSection.cs
- LongValidator.cs
- OpacityConverter.cs
- XslTransform.cs
- InlineUIContainer.cs
- CreateInstanceBinder.cs
- ConstraintStruct.cs
- UnsafeCollabNativeMethods.cs
- DataControlField.cs
- FileDialog_Vista.cs
- TextBoxAutoCompleteSourceConverter.cs
- PeerName.cs
- ErrorFormatterPage.cs
- FilterableAttribute.cs
- ContextMarshalException.cs
- PageBreakRecord.cs
- Vector3DValueSerializer.cs
- DataServiceQuery.cs
- TimeSpanStorage.cs
- TreeNodeCollection.cs
- ExtensibleClassFactory.cs
- DPCustomTypeDescriptor.cs
- OciLobLocator.cs
- ComponentRenameEvent.cs
- Zone.cs
- Bezier.cs
- WindowsPrincipal.cs
- QuaternionIndependentAnimationStorage.cs
- TypedServiceChannelBuilder.cs
- XmlSchemaComplexContent.cs
- login.cs
- XmlValidatingReaderImpl.cs
- EntityDescriptor.cs
- WsrmFault.cs
- _HTTPDateParse.cs
- BamlReader.cs
- BrowserCapabilitiesCodeGenerator.cs
- ProcessHostConfigUtils.cs
- DocumentApplication.cs
- SafeSecurityHandles.cs
- DPCustomTypeDescriptor.cs
- BitArray.cs
- EventDrivenDesigner.cs
- EntityDesignerDataSourceView.cs
- HttpDebugHandler.cs
- ManagementPath.cs
- EmptyElement.cs
- ImageDrawing.cs
- WindowsIdentity.cs
- HttpHeaderCollection.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- OuterGlowBitmapEffect.cs
- AutomationPattern.cs
- DrawingBrush.cs
- AssertSection.cs
- UnmanagedMemoryStream.cs
- BlockCollection.cs
- Thread.cs
- SelectedDatesCollection.cs
- SQLBytesStorage.cs
- Odbc32.cs
- SqlConnectionString.cs
- GrammarBuilderPhrase.cs
- SevenBitStream.cs
- LogLogRecord.cs
- UnsafeCollabNativeMethods.cs
- EndOfStreamException.cs
- NodeFunctions.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- LogFlushAsyncResult.cs
- NegotiateStream.cs
- InputEventArgs.cs
- WindowsGraphicsWrapper.cs
- SqlInternalConnectionTds.cs
- EventlogProvider.cs
- InstanceCreationEditor.cs
- _UncName.cs
- CommittableTransaction.cs
- SoapRpcServiceAttribute.cs
- UInt16Storage.cs
- DataAdapter.cs
- TextAdaptor.cs
- ConnectionPoolManager.cs
- DataObjectFieldAttribute.cs
- InlineObject.cs
- Propagator.cs
- HostProtectionException.cs
- ManipulationVelocities.cs
- CustomErrorsSection.cs
- SplitterEvent.cs
- IsolatedStoragePermission.cs