Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWebControls / System / Data / WebControls / ResourceDisplayNameAttribute.cs / 1305376 / ResourceDisplayNameAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//-----------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Reflection;
namespace System.Web.UI.WebControls
{
[AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = false)]
internal sealed class ResourceDisplayNameAttribute : DisplayNameAttribute
{
private bool _resourceLoaded;
private readonly string _displayNameResourceName;
public ResourceDisplayNameAttribute(string displayNameResourceName)
{
_displayNameResourceName = displayNameResourceName;
}
public override string DisplayName
{
get
{
if (!_resourceLoaded)
{
_resourceLoaded = true;
DisplayNameValue = System.Web.UI.WebControlsRes.GetString(_displayNameResourceName);
}
return base.DisplayName;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//-----------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Reflection;
namespace System.Web.UI.WebControls
{
[AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = false)]
internal sealed class ResourceDisplayNameAttribute : DisplayNameAttribute
{
private bool _resourceLoaded;
private readonly string _displayNameResourceName;
public ResourceDisplayNameAttribute(string displayNameResourceName)
{
_displayNameResourceName = displayNameResourceName;
}
public override string DisplayName
{
get
{
if (!_resourceLoaded)
{
_resourceLoaded = true;
DisplayNameValue = System.Web.UI.WebControlsRes.GetString(_displayNameResourceName);
}
return base.DisplayName;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- VariableDesigner.xaml.cs
- OutputCacheProfile.cs
- RootAction.cs
- HtmlTableCell.cs
- XamlTypeMapper.cs
- TextServicesHost.cs
- SqlBulkCopy.cs
- ScriptModule.cs
- WindowsFormsHelpers.cs
- IHttpResponseInternal.cs
- PersonalizationProvider.cs
- LinearGradientBrush.cs
- OracleRowUpdatingEventArgs.cs
- BaseComponentEditor.cs
- DataGridViewCellStyleConverter.cs
- ZoomingMessageFilter.cs
- LinqDataSourceDisposeEventArgs.cs
- LZCodec.cs
- UnionQueryOperator.cs
- HTMLTagNameToTypeMapper.cs
- CodeGroup.cs
- Vector3DAnimationBase.cs
- QueryOutputWriter.cs
- ReadOnlyDataSource.cs
- VariableQuery.cs
- XPathDocumentIterator.cs
- CompoundFileIOPermission.cs
- SafeHandles.cs
- SqlCharStream.cs
- WindowsAltTab.cs
- ObjectSet.cs
- ImageFormatConverter.cs
- ComplexType.cs
- StrongNameKeyPair.cs
- ThicknessKeyFrameCollection.cs
- UndoEngine.cs
- PropertyBuilder.cs
- TextBoxView.cs
- WeakReferenceEnumerator.cs
- OleDbDataAdapter.cs
- ListSurrogate.cs
- HtmlTableRowCollection.cs
- ActivityTypeResolver.xaml.cs
- IsolatedStorageException.cs
- LocalizableResourceBuilder.cs
- TraceSection.cs
- EventLogWatcher.cs
- CreatingCookieEventArgs.cs
- NoClickablePointException.cs
- StylusEditingBehavior.cs
- CryptographicAttribute.cs
- HwndStylusInputProvider.cs
- CompressionTransform.cs
- VBCodeProvider.cs
- Mutex.cs
- FormsAuthenticationModule.cs
- ResourceContainer.cs
- DifferencingCollection.cs
- SchemaImporterExtensionElement.cs
- TraceSource.cs
- MessageDecoder.cs
- SurrogateEncoder.cs
- _ConnectionGroup.cs
- ListBindingHelper.cs
- FacetChecker.cs
- ByteStack.cs
- IndentedWriter.cs
- InvalidBodyAccessException.cs
- COSERVERINFO.cs
- EraserBehavior.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- GeneralTransformGroup.cs
- ResXBuildProvider.cs
- Application.cs
- HttpWriter.cs
- NotifyParentPropertyAttribute.cs
- QilSortKey.cs
- SqlDataSourceView.cs
- DataControlFieldCell.cs
- PackageDigitalSignatureManager.cs
- HashCodeCombiner.cs
- WpfKnownTypeInvoker.cs
- SemanticKeyElement.cs
- ObjectDataSourceChooseTypePanel.cs
- TreeViewCancelEvent.cs
- BoolExpr.cs
- InvalidContentTypeException.cs
- TypeConverterValueSerializer.cs
- SqlInternalConnection.cs
- SHA512.cs
- SwitchLevelAttribute.cs
- WebAdminConfigurationHelper.cs
- AuthorizationRule.cs
- SdlChannelSink.cs
- PixelFormat.cs
- ShaderRenderModeValidation.cs
- BooleanExpr.cs
- VisualCollection.cs
- BrowserCapabilitiesCodeGenerator.cs
- httpapplicationstate.cs