Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / WebCategoryAttribute.cs / 1305376 / WebCategoryAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.Web {
using System;
using System.ComponentModel;
using System.Web.Util;
///
///
///
/// CategoryAttribute that can access ASP.NET localized strings.
///
///
[AttributeUsage(AttributeTargets.All)]
internal sealed class WebCategoryAttribute : CategoryAttribute {
///
///
/// Initializes a new instance of the class.
///
///
internal WebCategoryAttribute(string category) : base(category) {
}
public override object TypeId {
get {
return typeof(CategoryAttribute);
}
}
///
/// This method is called the first time the category property
/// is accessed. It provides a way to lookup a localized string for
/// the given category. Classes may override this to add their
/// own localized names to categories. If a localized string is
/// available for the given value, the method should return it.
/// Otherwise, it should return null.
///
protected override string GetLocalizedString(string value) {
string localizedValue = base.GetLocalizedString(value);
if (localizedValue == null) {
localizedValue = (string)SR.GetString("Category_" + value);
}
// This attribute is internal, and we should never have a missing resource string.
//
Debug.Assert(localizedValue != null, "All WebForms category attributes should have localized strings. Category '" + value + "' not found.");
return localizedValue;
}
}
}
// 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
- BamlResourceSerializer.cs
- WebRequestModulesSection.cs
- HostedTransportConfigurationBase.cs
- ArraySegment.cs
- AttachedProperty.cs
- HttpListenerResponse.cs
- documentation.cs
- ResourceDisplayNameAttribute.cs
- XmlnsDefinitionAttribute.cs
- HandleCollector.cs
- ISCIIEncoding.cs
- EasingKeyFrames.cs
- ClientTargetCollection.cs
- WebServiceMethodData.cs
- ActionMessageFilterTable.cs
- Encoder.cs
- DeliveryRequirementsAttribute.cs
- LayoutManager.cs
- Rss20FeedFormatter.cs
- DataTransferEventArgs.cs
- SqlTriggerContext.cs
- ControlPropertyNameConverter.cs
- ToolStripDropDownButton.cs
- ReferentialConstraint.cs
- ApplicationSettingsBase.cs
- MdImport.cs
- DataGridViewSelectedColumnCollection.cs
- NetStream.cs
- ClientConfigurationSystem.cs
- NamespaceList.cs
- DocumentXmlWriter.cs
- BrushConverter.cs
- IIS7WorkerRequest.cs
- WebSysDescriptionAttribute.cs
- MulticastNotSupportedException.cs
- ArgumentNullException.cs
- AssociationSetEnd.cs
- VectorCollectionConverter.cs
- EntityProxyTypeInfo.cs
- TileBrush.cs
- HttpPostedFileBase.cs
- CheckPair.cs
- TextSelectionProcessor.cs
- TypeSemantics.cs
- WebBrowserBase.cs
- PerformanceCounterManager.cs
- QilList.cs
- SoapParser.cs
- BaseParser.cs
- SizeAnimationBase.cs
- XmlElement.cs
- LightweightCodeGenerator.cs
- TextProperties.cs
- ToolStripPanelRenderEventArgs.cs
- WebPageTraceListener.cs
- UdpDiscoveryEndpointProvider.cs
- ParameterEditorUserControl.cs
- CodeAttributeArgument.cs
- XmlSchemaComplexContentRestriction.cs
- DocumentPage.cs
- SchemaMerger.cs
- WebSysDisplayNameAttribute.cs
- ActiveXHelper.cs
- _AutoWebProxyScriptWrapper.cs
- ImageBrush.cs
- Helper.cs
- PermissionSetTriple.cs
- PageThemeCodeDomTreeGenerator.cs
- LongAverageAggregationOperator.cs
- Literal.cs
- Formatter.cs
- webproxy.cs
- RunWorkerCompletedEventArgs.cs
- Documentation.cs
- SmiEventSink.cs
- BookmarkEventArgs.cs
- listviewsubitemcollectioneditor.cs
- NameValuePermission.cs
- RowToParametersTransformer.cs
- ProtectedConfiguration.cs
- ConfigXmlElement.cs
- Icon.cs
- TextMetrics.cs
- Mouse.cs
- TreeViewDesigner.cs
- PerformanceCounterLib.cs
- TransformPattern.cs
- DataGridRelationshipRow.cs
- webproxy.cs
- EventRouteFactory.cs
- DataConnectionHelper.cs
- EncodedStreamFactory.cs
- TextDecoration.cs
- WebPartZone.cs
- Executor.cs
- XsltInput.cs
- UnicastIPAddressInformationCollection.cs
- XMLUtil.cs
- DataGridCellClipboardEventArgs.cs
- Misc.cs