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
- TextBoxBase.cs
- SystemEvents.cs
- Roles.cs
- ScrollViewer.cs
- XmlDataImplementation.cs
- ScrollViewerAutomationPeer.cs
- SubordinateTransaction.cs
- Iis7Helper.cs
- DBDataPermission.cs
- WorkflowWebService.cs
- log.cs
- LOSFormatter.cs
- NullableConverter.cs
- SettingsPropertyValue.cs
- SourceFileBuildProvider.cs
- xsdvalidator.cs
- PrimitiveSchema.cs
- Ref.cs
- TransmissionStrategy.cs
- HtmlButton.cs
- WebDescriptionAttribute.cs
- SQLUtility.cs
- autovalidator.cs
- SourceFileBuildProvider.cs
- TabControlEvent.cs
- FormattedTextSymbols.cs
- LineProperties.cs
- LassoSelectionBehavior.cs
- NonVisualControlAttribute.cs
- SplitContainer.cs
- StylusEditingBehavior.cs
- XhtmlConformanceSection.cs
- ViewStateModeByIdAttribute.cs
- ProcessDesigner.cs
- StaticExtension.cs
- DbResourceAllocator.cs
- WindowsProgressbar.cs
- CompiledQueryCacheKey.cs
- RectangleGeometry.cs
- messageonlyhwndwrapper.cs
- ListViewGroupItemCollection.cs
- FormViewCommandEventArgs.cs
- HGlobalSafeHandle.cs
- DiscoveryCallbackBehavior.cs
- ModuleElement.cs
- NameValuePermission.cs
- AstTree.cs
- FormViewRow.cs
- WaveHeader.cs
- DataGridViewUtilities.cs
- Utils.cs
- ComponentEditorPage.cs
- TranslateTransform.cs
- EmptyEnumerator.cs
- ItemCheckedEvent.cs
- ModelService.cs
- ProfilePropertyNameValidator.cs
- KoreanLunisolarCalendar.cs
- _SslState.cs
- ObjectDisposedException.cs
- DocumentOrderQuery.cs
- SoapClientMessage.cs
- BuildResult.cs
- DependencyPropertyAttribute.cs
- shaperfactoryquerycachekey.cs
- StrokeNodeEnumerator.cs
- HtmlInputHidden.cs
- Hyperlink.cs
- TreeNodeStyleCollection.cs
- Visitor.cs
- ScriptReferenceBase.cs
- ActivityDesigner.cs
- FrameworkContentElement.cs
- SiteMap.cs
- AsyncResult.cs
- WmlTextBoxAdapter.cs
- DbParameterCollection.cs
- SettingsPropertyCollection.cs
- TextProperties.cs
- ValueType.cs
- PropertyContainer.cs
- ObjectSecurity.cs
- DataGridTextBox.cs
- DateTimeOffset.cs
- PageBuildProvider.cs
- Matrix.cs
- ConfigXmlComment.cs
- CommandBindingCollection.cs
- XmlSchemaImporter.cs
- XmlStringTable.cs
- LinkedDataMemberFieldEditor.cs
- CodeTypeMember.cs
- SHA1.cs
- SerializationFieldInfo.cs
- CompositeTypefaceMetrics.cs
- OrthographicCamera.cs
- FixedDocument.cs
- SubpageParaClient.cs
- DataTableTypeConverter.cs
- DbProviderFactory.cs