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
- Directory.cs
- BaseDataBoundControlDesigner.cs
- XNodeNavigator.cs
- DataGridViewImageCell.cs
- Matrix.cs
- PersonalizationAdministration.cs
- ListViewItem.cs
- EntityDescriptor.cs
- ComponentDispatcherThread.cs
- ThreadPool.cs
- TypeReference.cs
- __Filters.cs
- Material.cs
- SmiMetaData.cs
- SettingsContext.cs
- CleanUpVirtualizedItemEventArgs.cs
- NoPersistScope.cs
- SchemaTableColumn.cs
- XPathScanner.cs
- nulltextnavigator.cs
- PrePrepareMethodAttribute.cs
- DataGridViewTextBoxColumn.cs
- WpfWebRequestHelper.cs
- XPathNodeIterator.cs
- TraceFilter.cs
- XmlStringTable.cs
- StringToken.cs
- HuffModule.cs
- HttpCacheParams.cs
- FilterableAttribute.cs
- ForceCopyBuildProvider.cs
- SimpleApplicationHost.cs
- WebPartHelpVerb.cs
- MailDefinition.cs
- ContentType.cs
- Ray3DHitTestResult.cs
- EventTask.cs
- MethodBody.cs
- DependencyPropertyDescriptor.cs
- LicFileLicenseProvider.cs
- WebEventCodes.cs
- FreeFormDesigner.cs
- NavigateEvent.cs
- DataColumnSelectionConverter.cs
- messageonlyhwndwrapper.cs
- HttpResponse.cs
- dataprotectionpermission.cs
- Keyboard.cs
- LabelDesigner.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- Comparer.cs
- InputGestureCollection.cs
- SettingsSection.cs
- DataServiceHostFactory.cs
- arc.cs
- Resources.Designer.cs
- ClientConfigurationHost.cs
- ProfileSettings.cs
- DesignTimeType.cs
- isolationinterop.cs
- DesigntimeLicenseContextSerializer.cs
- ModuleElement.cs
- DataTableReaderListener.cs
- TcpWorkerProcess.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- _SslState.cs
- WebBrowserContainer.cs
- XPathParser.cs
- Number.cs
- NameService.cs
- MobileContainerDesigner.cs
- MemberDomainMap.cs
- TypeUsage.cs
- DataBindEngine.cs
- EmulateRecognizeCompletedEventArgs.cs
- ControlAdapter.cs
- BindingListCollectionView.cs
- _AcceptOverlappedAsyncResult.cs
- TraceUtility.cs
- OleDbDataAdapter.cs
- BamlLocalizableResource.cs
- EDesignUtil.cs
- _AutoWebProxyScriptWrapper.cs
- DesignerMetadata.cs
- SingleStorage.cs
- BufferBuilder.cs
- SystemParameters.cs
- LockCookie.cs
- RefreshPropertiesAttribute.cs
- LocatorPartList.cs
- TextRange.cs
- GenericAuthenticationEventArgs.cs
- SqlMethodTransformer.cs
- AttributeSetAction.cs
- Control.cs
- PathGradientBrush.cs
- ProxyWebPart.cs
- Component.cs
- webeventbuffer.cs
- SchemaMapping.cs