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
- SqlGatherConsumedAliases.cs
- GradientBrush.cs
- GeneralTransformGroup.cs
- DnsPermission.cs
- Int32Collection.cs
- XmlSchemaComplexContentRestriction.cs
- CodeVariableReferenceExpression.cs
- ApplicationServicesHostFactory.cs
- MemberMemberBinding.cs
- TableLayoutCellPaintEventArgs.cs
- RotateTransform3D.cs
- LinqDataSourceValidationException.cs
- DecoderNLS.cs
- ProcessThreadCollection.cs
- ClientUriBehavior.cs
- DBSchemaRow.cs
- ObjectDataSourceDisposingEventArgs.cs
- ContentPathSegment.cs
- DataControlFieldHeaderCell.cs
- NullReferenceException.cs
- SerializerWriterEventHandlers.cs
- FilterException.cs
- LinqDataSourceValidationException.cs
- ResourcePermissionBase.cs
- CookieProtection.cs
- Merger.cs
- Base64Encoder.cs
- Splitter.cs
- CollectionView.cs
- ContractMapping.cs
- CodeNamespaceImport.cs
- ForwardPositionQuery.cs
- SimplePropertyEntry.cs
- ToolboxItem.cs
- IdentifierElement.cs
- DataGridViewDesigner.cs
- Type.cs
- ConstantProjectedSlot.cs
- HandlerFactoryWrapper.cs
- ErrorReporting.cs
- Environment.cs
- ByteStorage.cs
- ListBoxItemAutomationPeer.cs
- DefaultValueAttribute.cs
- ContentIterators.cs
- ActivityIdHeader.cs
- AttributeEmitter.cs
- GorillaCodec.cs
- ClientUrlResolverWrapper.cs
- ReferencedType.cs
- PnrpPermission.cs
- sqlpipe.cs
- DBSqlParser.cs
- ACL.cs
- SqlAliaser.cs
- PropertyFilterAttribute.cs
- ActivityXamlServices.cs
- DispatcherProcessingDisabled.cs
- Qualifier.cs
- HostAdapter.cs
- VoiceInfo.cs
- UIElement3DAutomationPeer.cs
- SessionEndingEventArgs.cs
- CssClassPropertyAttribute.cs
- Nullable.cs
- TimeSpanOrInfiniteValidator.cs
- TextServicesPropertyRanges.cs
- UnicodeEncoding.cs
- DSASignatureDeformatter.cs
- LocalTransaction.cs
- ItemContainerGenerator.cs
- TickBar.cs
- RegularExpressionValidator.cs
- MenuItemCollectionEditorDialog.cs
- DataGridCell.cs
- DataGridViewButtonColumn.cs
- ConnectorEditor.cs
- SessionEndedEventArgs.cs
- UnsafeNativeMethods.cs
- IteratorFilter.cs
- ImmutablePropertyDescriptorGridEntry.cs
- ObjectStateEntry.cs
- OdbcErrorCollection.cs
- ConnectionString.cs
- PointValueSerializer.cs
- UserMapPath.cs
- AstTree.cs
- VisualTarget.cs
- SettingsAttributeDictionary.cs
- EntityContainerEmitter.cs
- RecommendedAsConfigurableAttribute.cs
- LayoutTableCell.cs
- BuildManagerHost.cs
- BoundConstants.cs
- DataViewManager.cs
- EntityChangedParams.cs
- SetterBase.cs
- WebPartTransformer.cs
- TerminateSequenceResponse.cs
- AggregatePushdown.cs