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
- DriveInfo.cs
- PropertyGridView.cs
- CardSpacePolicyElement.cs
- XhtmlTextWriter.cs
- ListViewGroupConverter.cs
- WindowsTab.cs
- MSAANativeProvider.cs
- PageAdapter.cs
- OracleConnection.cs
- EventSinkHelperWriter.cs
- RowBinding.cs
- InputLangChangeEvent.cs
- GridViewCommandEventArgs.cs
- SiteMapDesignerDataSourceView.cs
- Roles.cs
- BamlBinaryWriter.cs
- COM2TypeInfoProcessor.cs
- ProxyDataContractResolver.cs
- IChannel.cs
- XmlBindingWorker.cs
- AxisAngleRotation3D.cs
- ICspAsymmetricAlgorithm.cs
- SerialErrors.cs
- TableNameAttribute.cs
- Regex.cs
- MenuItem.cs
- TypeSystem.cs
- AssemblyBuilder.cs
- KnownColorTable.cs
- InheritedPropertyChangedEventArgs.cs
- XmlTypeMapping.cs
- DocobjHost.cs
- MetadataItemSerializer.cs
- SoapAttributes.cs
- DecoratedNameAttribute.cs
- ColumnResult.cs
- ExtendedTransformFactory.cs
- EntityDescriptor.cs
- PersonalizationStateQuery.cs
- DelimitedListTraceListener.cs
- TypeElementCollection.cs
- InkCanvasSelectionAdorner.cs
- HybridDictionary.cs
- TextSpan.cs
- DataGridViewCellValueEventArgs.cs
- Collection.cs
- FontUnitConverter.cs
- WebPartDisplayModeCancelEventArgs.cs
- WebServiceEnumData.cs
- KeySplineConverter.cs
- DynamicVirtualDiscoSearcher.cs
- Track.cs
- RangeValueProviderWrapper.cs
- XmlSchemaType.cs
- SystemResourceKey.cs
- RootBrowserWindowProxy.cs
- XmlTypeMapping.cs
- InvokePattern.cs
- DataGridTextBoxColumn.cs
- DataGridViewRowHeaderCell.cs
- Membership.cs
- CounterCreationData.cs
- DeflateStream.cs
- ImmutableObjectAttribute.cs
- TextTreeNode.cs
- FaultBookmark.cs
- TargetFrameworkAttribute.cs
- TimeoutStream.cs
- SBCSCodePageEncoding.cs
- TextDecorationCollection.cs
- Utils.cs
- WebConfigurationManager.cs
- IsolatedStorageFileStream.cs
- ApplicationManager.cs
- BufferModesCollection.cs
- SEHException.cs
- ADConnectionHelper.cs
- PermissionSetEnumerator.cs
- Menu.cs
- TemplatedMailWebEventProvider.cs
- MediaEntryAttribute.cs
- KnownTypesProvider.cs
- MethodToken.cs
- SynchronizedInputHelper.cs
- DataServiceRequestOfT.cs
- dataprotectionpermission.cs
- transactioncontext.cs
- ResolvedKeyFrameEntry.cs
- StringSource.cs
- ByteStream.cs
- FunctionCommandText.cs
- BrushConverter.cs
- WebPartConnectionsCancelVerb.cs
- DataGridCell.cs
- MediaSystem.cs
- ListItemsPage.cs
- uribuilder.cs
- ImageAutomationPeer.cs
- TabControl.cs
- TextSerializer.cs