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
- OpenFileDialog.cs
- Brush.cs
- ObjectPersistData.cs
- ExpressionNode.cs
- ProgressBarRenderer.cs
- DataGridViewCellEventArgs.cs
- DataGridPageChangedEventArgs.cs
- TdsParserHelperClasses.cs
- DataBoundControlAdapter.cs
- GAC.cs
- ImageClickEventArgs.cs
- UserControlBuildProvider.cs
- BordersPage.cs
- PageVisual.cs
- PtsHelper.cs
- Main.cs
- DefinitionUpdate.cs
- TriState.cs
- UpdatePanelTriggerCollection.cs
- TextElementCollection.cs
- Rect3D.cs
- ByteAnimationBase.cs
- Cursors.cs
- TabPanel.cs
- MatrixTransform3D.cs
- GridSplitter.cs
- RegexTree.cs
- Header.cs
- AtomServiceDocumentSerializer.cs
- PanelStyle.cs
- Classification.cs
- CompiledIdentityConstraint.cs
- SafeArrayRankMismatchException.cs
- OpCellTreeNode.cs
- PipeConnection.cs
- WindowsProgressbar.cs
- CompilerGlobalScopeAttribute.cs
- DbModificationClause.cs
- OutputCacheSettings.cs
- DelegateSerializationHolder.cs
- User.cs
- InvalidStoreProtectionKeyException.cs
- SqlOuterApplyReducer.cs
- WebPartConnectionsConfigureVerb.cs
- CodePrimitiveExpression.cs
- FileDialogCustomPlace.cs
- PackagePartCollection.cs
- Int64Storage.cs
- DocumentOrderComparer.cs
- RunWorkerCompletedEventArgs.cs
- CompilerGlobalScopeAttribute.cs
- TypeElement.cs
- EditableRegion.cs
- StrokeCollectionDefaultValueFactory.cs
- XPathNodeInfoAtom.cs
- XmlObjectSerializerContext.cs
- templategroup.cs
- XmlDocumentSchema.cs
- BitmapEffectState.cs
- SchemaImporter.cs
- X509AsymmetricSecurityKey.cs
- Parameter.cs
- CodeComment.cs
- XmlDataSource.cs
- ImmutableObjectAttribute.cs
- unitconverter.cs
- DataGridViewAdvancedBorderStyle.cs
- ObjectSpanRewriter.cs
- RawStylusInputCustomData.cs
- XslVisitor.cs
- AsyncOperationManager.cs
- LinqDataSourceSelectEventArgs.cs
- WeakReference.cs
- XmlWellformedWriter.cs
- WrappedKeySecurityToken.cs
- ColorContext.cs
- AuthenticatingEventArgs.cs
- TcpTransportSecurity.cs
- SelectionRangeConverter.cs
- XmlSchemaComplexContent.cs
- HexParser.cs
- EnvironmentPermission.cs
- UpdateDelegates.Generated.cs
- WebBrowser.cs
- DataSourceDescriptorCollection.cs
- XhtmlBasicLiteralTextAdapter.cs
- DoubleAnimation.cs
- Size3DValueSerializer.cs
- ComboBox.cs
- BigInt.cs
- COM2EnumConverter.cs
- EntityKey.cs
- SiteMapPath.cs
- NetMsmqBindingElement.cs
- MetadataSource.cs
- RelationshipConverter.cs
- HandledMouseEvent.cs
- ScriptManager.cs
- RsaSecurityTokenAuthenticator.cs
- DesignerAdapterAttribute.cs