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
- TextSelectionHelper.cs
- ObjectMemberMapping.cs
- CmsUtils.cs
- ClientBuildManagerCallback.cs
- _PooledStream.cs
- IUnknownConstantAttribute.cs
- SiteMapPath.cs
- LabelExpression.cs
- ControlParameter.cs
- UInt16Converter.cs
- ObjectListSelectEventArgs.cs
- MessageQueueException.cs
- StatusBar.cs
- ObjectCloneHelper.cs
- DesignerCommandAdapter.cs
- BindableTemplateBuilder.cs
- WindowInteropHelper.cs
- ToolStrip.cs
- PropertyTab.cs
- ListViewTableRow.cs
- UnsafeNativeMethods.cs
- FileDialog.cs
- InputReportEventArgs.cs
- EventLogEntryCollection.cs
- SqlConnectionStringBuilder.cs
- ElementMarkupObject.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- WebBrowserUriTypeConverter.cs
- UInt64Converter.cs
- HttpConfigurationSystem.cs
- DBCommandBuilder.cs
- HttpHandlerActionCollection.cs
- DataGridViewCellParsingEventArgs.cs
- TypeExtensionConverter.cs
- DesignerVerb.cs
- ObjectQueryProvider.cs
- RpcResponse.cs
- HttpContextWrapper.cs
- TextElementCollectionHelper.cs
- ComboBoxAutomationPeer.cs
- GroupAggregateExpr.cs
- XmlSchemaObject.cs
- HtmlWindow.cs
- FrugalList.cs
- UTF32Encoding.cs
- basemetadatamappingvisitor.cs
- XmlHierarchicalDataSourceView.cs
- DataGridPageChangedEventArgs.cs
- PathGradientBrush.cs
- UnknownBitmapEncoder.cs
- VirtualDirectoryMappingCollection.cs
- X509WindowsSecurityToken.cs
- KeyGestureConverter.cs
- HttpResponseInternalBase.cs
- TraceContext.cs
- IOException.cs
- ObjectReferenceStack.cs
- ColumnReorderedEventArgs.cs
- Not.cs
- MediaElementAutomationPeer.cs
- ZipIOExtraFieldPaddingElement.cs
- AnnotationComponentChooser.cs
- ReadOnlyHierarchicalDataSourceView.cs
- XmlElementCollection.cs
- XmlSchemaComplexContentExtension.cs
- ContainerControl.cs
- HandlerMappingMemo.cs
- SemaphoreSecurity.cs
- XmlParserContext.cs
- FontStyleConverter.cs
- CopyNamespacesAction.cs
- HiddenFieldPageStatePersister.cs
- TileBrush.cs
- XmlSchemaObject.cs
- DataGridParentRows.cs
- DateTimeFormat.cs
- HashCodeCombiner.cs
- MessageDecoder.cs
- InvalidDataException.cs
- BidOverLoads.cs
- FixedDSBuilder.cs
- OraclePermissionAttribute.cs
- InstanceKey.cs
- Span.cs
- AuthenticationManager.cs
- DataContract.cs
- SqlProviderServices.cs
- NamespaceInfo.cs
- CodeDomExtensionMethods.cs
- XpsManager.cs
- UniqueConstraint.cs
- CodeDomComponentSerializationService.cs
- StreamAsIStream.cs
- ObjectNavigationPropertyMapping.cs
- XmlHierarchyData.cs
- Rotation3DAnimation.cs
- SupportingTokenBindingElement.cs
- BamlResourceSerializer.cs
- HashAlgorithm.cs
- SQLMembershipProvider.cs