Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / WebCategoryAttribute.cs / 1 / 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;
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MonthChangedEventArgs.cs
- FilterEventArgs.cs
- AdRotator.cs
- ListItem.cs
- SlotInfo.cs
- ListViewDeletedEventArgs.cs
- ToolStripItemTextRenderEventArgs.cs
- InvokeSchedule.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- QueryOutputWriter.cs
- PostBackOptions.cs
- PriorityQueue.cs
- VisualStateGroup.cs
- CodeParameterDeclarationExpression.cs
- LogicalMethodInfo.cs
- VisualStyleRenderer.cs
- SecurityUniqueId.cs
- CacheHelper.cs
- BitmapEffectDrawing.cs
- XmlEntityReference.cs
- RSAPKCS1KeyExchangeFormatter.cs
- BamlTreeUpdater.cs
- VisualCollection.cs
- EntityCommand.cs
- SystemResources.cs
- ReadOnlyCollection.cs
- QilLoop.cs
- MatrixIndependentAnimationStorage.cs
- XmlSchemaNotation.cs
- NetTcpSectionData.cs
- EntitySetDataBindingList.cs
- XmlSchemaObject.cs
- X509InitiatorCertificateServiceElement.cs
- UInt64.cs
- filewebresponse.cs
- WebPartDisplayModeEventArgs.cs
- UncommonField.cs
- Transform.cs
- CreateUserWizardStep.cs
- DataGridPagerStyle.cs
- DashStyle.cs
- BamlRecordReader.cs
- WebPartTransformerCollection.cs
- ColorContextHelper.cs
- FixedSOMPageElement.cs
- PropertyItemInternal.cs
- BaseTemplateBuildProvider.cs
- SrgsGrammarCompiler.cs
- ConfigurationPermission.cs
- ExpressionList.cs
- securitycriticaldataClass.cs
- FunctionImportMapping.cs
- SingleObjectCollection.cs
- SecureStringHasher.cs
- MarkupExtensionParser.cs
- StreamUpdate.cs
- NavigationPropertyEmitter.cs
- SafeHandle.cs
- SymmetricKeyWrap.cs
- EntityDataSourceUtil.cs
- SystemIPAddressInformation.cs
- CommandTreeTypeHelper.cs
- InstalledFontCollection.cs
- RecordConverter.cs
- DefaultDiscoveryServiceExtension.cs
- RuntimeIdentifierPropertyAttribute.cs
- CustomErrorsSectionWrapper.cs
- XmlSchemaImporter.cs
- HttpModuleActionCollection.cs
- TypeSystem.cs
- PropVariant.cs
- DataGridViewSelectedRowCollection.cs
- DateTimeFormatInfoScanner.cs
- StaticResourceExtension.cs
- FixedStringLookup.cs
- ToolboxItemFilterAttribute.cs
- FloaterParagraph.cs
- XmlValidatingReaderImpl.cs
- XmlWellformedWriter.cs
- InputBuffer.cs
- SafeCryptoHandles.cs
- XmlEncoding.cs
- CaseKeyBox.xaml.cs
- KeyBinding.cs
- Codec.cs
- NativeMethods.cs
- EventLogPermission.cs
- FullTextBreakpoint.cs
- TextEditorDragDrop.cs
- OverlappedAsyncResult.cs
- SQLSingleStorage.cs
- StylusPointProperty.cs
- SR.cs
- KeyValuePair.cs
- SatelliteContractVersionAttribute.cs
- Container.cs
- SHA1.cs
- OwnerDrawPropertyBag.cs
- InputScope.cs
- KerberosRequestorSecurityTokenAuthenticator.cs