Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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; } } } // 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
- ParameterBuilder.cs
- Message.cs
- CodeObject.cs
- ErrorFormatterPage.cs
- ISCIIEncoding.cs
- SectionInput.cs
- SharedHttpTransportManager.cs
- EncryptedKeyIdentifierClause.cs
- PointCollectionValueSerializer.cs
- TextModifier.cs
- ListSurrogate.cs
- WindowsRebar.cs
- TypeReference.cs
- RemotingHelper.cs
- FormViewDeletedEventArgs.cs
- ConfigurationPropertyCollection.cs
- MergePropertyDescriptor.cs
- ZipIOLocalFileBlock.cs
- AssemblyNameEqualityComparer.cs
- TableCellAutomationPeer.cs
- ItemCheckedEvent.cs
- RawStylusInputReport.cs
- DataObjectEventArgs.cs
- BoundsDrawingContextWalker.cs
- BaseTemplateBuildProvider.cs
- TextBox.cs
- AutomationElement.cs
- MethodBuilder.cs
- XmlParser.cs
- ToolStripGripRenderEventArgs.cs
- ItemsPresenter.cs
- SQLInt32Storage.cs
- GregorianCalendarHelper.cs
- MarkupCompilePass1.cs
- FontStyle.cs
- ManagedIStream.cs
- DataMemberFieldEditor.cs
- SmiSettersStream.cs
- PageRanges.cs
- SiteMapSection.cs
- DesignConnection.cs
- ProgressPage.cs
- SingleAnimation.cs
- SessionStateModule.cs
- FactoryMaker.cs
- NameValuePair.cs
- ExpressionParser.cs
- StreamGeometryContext.cs
- ContentPathSegment.cs
- XmlCustomFormatter.cs
- GlyphRunDrawing.cs
- BitmapVisualManager.cs
- ResXDataNode.cs
- Brushes.cs
- FontResourceCache.cs
- XmlUtil.cs
- RestHandler.cs
- FormsAuthenticationModule.cs
- ApplicationId.cs
- ObjectCloneHelper.cs
- SecurityState.cs
- TraceUtils.cs
- lengthconverter.cs
- ReplacementText.cs
- CqlGenerator.cs
- SubMenuStyleCollectionEditor.cs
- WebPartPersonalization.cs
- MultipartContentParser.cs
- ProfessionalColorTable.cs
- Schema.cs
- MergeLocalizationDirectives.cs
- NetNamedPipeSecurityElement.cs
- Size.cs
- FilteredSchemaElementLookUpTable.cs
- XmlQueryType.cs
- ColorBlend.cs
- Visual.cs
- PaintEvent.cs
- DataGridViewCellStyle.cs
- TraceListener.cs
- DataGridViewHeaderCell.cs
- RectIndependentAnimationStorage.cs
- XslVisitor.cs
- PageStatePersister.cs
- AddInActivator.cs
- Grid.cs
- HttpPostProtocolImporter.cs
- SqlCacheDependencyDatabase.cs
- Item.cs
- ResourceAttributes.cs
- DataGridTableCollection.cs
- Speller.cs
- DbParameterCollection.cs
- XmlText.cs
- AssociationType.cs
- FontCacheLogic.cs
- MarkupCompilePass2.cs
- AnnotationDocumentPaginator.cs
- HttpVersion.cs
- OperatingSystem.cs