Code:
/ FX-1434 / FX-1434 / 1.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; ////// /// [AttributeUsage(AttributeTargets.All)] internal sealed class WebCategoryAttribute : CategoryAttribute { ////// CategoryAttribute that can access ASP.NET localized strings. /// ////// internal WebCategoryAttribute(string category) : base(category) { } public override object TypeId { get { return typeof(CategoryAttribute); } } ////// Initializes a new instance of the ///class. /// /// 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
- HttpCapabilitiesSectionHandler.cs
- SymDocumentType.cs
- DiscoveryRequestHandler.cs
- XmlBinaryReader.cs
- RankException.cs
- ApplicationServiceManager.cs
- BitmapEffectInput.cs
- TypeBuilderInstantiation.cs
- XPathQueryGenerator.cs
- DataSetUtil.cs
- ArraySegment.cs
- TypedTableBase.cs
- SessionSwitchEventArgs.cs
- StylusPointCollection.cs
- EntityType.cs
- ConnectionStringSettingsCollection.cs
- WindowsGrip.cs
- SettingsPropertyIsReadOnlyException.cs
- LinkTarget.cs
- Label.cs
- EntityConnection.cs
- SponsorHelper.cs
- DbParameterHelper.cs
- InvalidPrinterException.cs
- XmlSchemaComplexContent.cs
- ReturnType.cs
- ComponentEditorForm.cs
- StaticSiteMapProvider.cs
- CodeDirectiveCollection.cs
- DataGridViewAutoSizeModeEventArgs.cs
- CompiledRegexRunner.cs
- ItemChangedEventArgs.cs
- Facet.cs
- safemediahandle.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- mediaeventshelper.cs
- NavigationPropertySingletonExpression.cs
- CssTextWriter.cs
- NameTable.cs
- HttpPostLocalhostServerProtocol.cs
- BackStopAuthenticationModule.cs
- AnonymousIdentificationModule.cs
- DataGridViewComboBoxEditingControl.cs
- baseaxisquery.cs
- XmlEncApr2001.cs
- BamlBinaryReader.cs
- PolyLineSegment.cs
- IISMapPath.cs
- ValidationSummary.cs
- GridViewSortEventArgs.cs
- Single.cs
- LogSwitch.cs
- VectorAnimationUsingKeyFrames.cs
- MetadataUtilsSmi.cs
- UserNameSecurityTokenProvider.cs
- KnownBoxes.cs
- CustomAttributeSerializer.cs
- TemplatePropertyEntry.cs
- DBAsyncResult.cs
- DictationGrammar.cs
- TextChange.cs
- baseaxisquery.cs
- BoundField.cs
- TextRangeAdaptor.cs
- XmlSerializerFactory.cs
- RadioButtonRenderer.cs
- AppliesToBehaviorDecisionTable.cs
- DataTableMappingCollection.cs
- DataGridViewSelectedRowCollection.cs
- ColumnMapVisitor.cs
- GridViewCancelEditEventArgs.cs
- ResponseBodyWriter.cs
- HttpBindingExtension.cs
- ConsoleTraceListener.cs
- AbstractDataSvcMapFileLoader.cs
- MsdtcWrapper.cs
- KeyNotFoundException.cs
- RetrieveVirtualItemEventArgs.cs
- UserNamePasswordValidator.cs
- TextRange.cs
- BindingExpressionUncommonField.cs
- RelationshipEntry.cs
- TagNameToTypeMapper.cs
- IDReferencePropertyAttribute.cs
- AssemblyAssociatedContentFileAttribute.cs
- ButtonStandardAdapter.cs
- UnaryExpression.cs
- XMLUtil.cs
- BaseConfigurationRecord.cs
- AttachmentCollection.cs
- AppDomainInstanceProvider.cs
- WebHostedComPlusServiceHost.cs
- PriorityItem.cs
- EncodingStreamWrapper.cs
- JumpItem.cs
- SystemInformation.cs
- securestring.cs
- Cell.cs
- ObjectListCommandEventArgs.cs
- TabletDeviceInfo.cs