Code:
/ 4.0 / 4.0 / 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; ////// /// [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
- MouseBinding.cs
- MsmqHostedTransportManager.cs
- _NetRes.cs
- DataGridViewComboBoxEditingControl.cs
- StdValidatorsAndConverters.cs
- MailMessage.cs
- MsmqHostedTransportConfiguration.cs
- OrderedDictionary.cs
- _UriTypeConverter.cs
- HitTestWithPointDrawingContextWalker.cs
- HttpCookieCollection.cs
- FixedSchema.cs
- MemoryStream.cs
- SectionInformation.cs
- ClientApiGenerator.cs
- AuthenticationModuleElementCollection.cs
- SelectingProviderEventArgs.cs
- HttpSysSettings.cs
- OracleDataReader.cs
- SchemaSetCompiler.cs
- StringFunctions.cs
- TCPListener.cs
- ImageResources.Designer.cs
- CacheMemory.cs
- ChameleonKey.cs
- XmlCountingReader.cs
- TextElementAutomationPeer.cs
- CodeTypeOfExpression.cs
- CodePageUtils.cs
- CachedTypeface.cs
- AutomationProperty.cs
- ToolboxBitmapAttribute.cs
- HttpConfigurationContext.cs
- InfoCardServiceInstallComponent.cs
- BuildProviderAppliesToAttribute.cs
- Regex.cs
- MouseDevice.cs
- ToolStripHighContrastRenderer.cs
- SplayTreeNode.cs
- TargetFrameworkAttribute.cs
- QuotedStringWriteStateInfo.cs
- TimelineCollection.cs
- PolicyStatement.cs
- DrawingCollection.cs
- HttpCachePolicyElement.cs
- GrammarBuilder.cs
- MessagePropertyFilter.cs
- MetadataItem.cs
- PointCollection.cs
- ScrollChrome.cs
- PointAnimationUsingKeyFrames.cs
- xmlsaver.cs
- StoreAnnotationsMap.cs
- ObjectStateEntryDbDataRecord.cs
- ToolStripItemRenderEventArgs.cs
- ProxyManager.cs
- StringFunctions.cs
- GuidelineSet.cs
- EditorPartChrome.cs
- NetworkStream.cs
- SoapIncludeAttribute.cs
- FormViewInsertEventArgs.cs
- ComponentResourceManager.cs
- XComponentModel.cs
- Item.cs
- SizeConverter.cs
- HwndSubclass.cs
- VisualBasicExpressionConverter.cs
- MetadataArtifactLoaderComposite.cs
- ManualResetEvent.cs
- RowParagraph.cs
- XmlNodeComparer.cs
- EdmToObjectNamespaceMap.cs
- Freezable.cs
- DirectoryNotFoundException.cs
- SoapElementAttribute.cs
- LineInfo.cs
- Section.cs
- Attributes.cs
- WindowsFormsHelpers.cs
- MetadataElement.cs
- NamespaceTable.cs
- TileBrush.cs
- ObjectDataProvider.cs
- ClrProviderManifest.cs
- ListBox.cs
- TypeBrowser.xaml.cs
- Quad.cs
- LocalBuilder.cs
- ExpressionLexer.cs
- DataGridViewAutoSizeModeEventArgs.cs
- SiteMapDataSource.cs
- CodeBlockBuilder.cs
- CodeDelegateInvokeExpression.cs
- GridEntry.cs
- CopyAction.cs
- XmlLanguageConverter.cs
- AttributeUsageAttribute.cs
- EntitySqlQueryState.cs
- XpsDocumentEvent.cs