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
- FormViewInsertEventArgs.cs
- Rights.cs
- TabPage.cs
- XmlHierarchicalEnumerable.cs
- SoapElementAttribute.cs
- Clipboard.cs
- MultiSelectRootGridEntry.cs
- TextWriterTraceListener.cs
- DefinitionBase.cs
- XsdValidatingReader.cs
- DataGridViewCellStyle.cs
- ServicesUtilities.cs
- CacheRequest.cs
- BaseHashHelper.cs
- SplitContainer.cs
- WebPartDisplayModeCollection.cs
- LongCountAggregationOperator.cs
- ContractCodeDomInfo.cs
- SHA384Cng.cs
- VectorCollection.cs
- PinnedBufferMemoryStream.cs
- TextEditor.cs
- UIElement3D.cs
- Encoder.cs
- SmiContextFactory.cs
- TextDecorationUnitValidation.cs
- ContentControl.cs
- SafeRightsManagementQueryHandle.cs
- GC.cs
- DataBindingCollection.cs
- _NegotiateClient.cs
- listitem.cs
- ActivityCodeDomReferenceService.cs
- InvalidStoreProtectionKeyException.cs
- Utils.cs
- ParameterElementCollection.cs
- CheckBoxBaseAdapter.cs
- FixedTextBuilder.cs
- SessionStateContainer.cs
- SspiSecurityToken.cs
- XmlUtilWriter.cs
- DelegateTypeInfo.cs
- RectangleHotSpot.cs
- StandardBindingElementCollection.cs
- Timeline.cs
- Vector.cs
- CachingParameterInspector.cs
- WindowPattern.cs
- ViewCellRelation.cs
- TabControlDesigner.cs
- TextRangeSerialization.cs
- DesignerResources.cs
- XmlSchemaComplexContent.cs
- ConfigurationErrorsException.cs
- OledbConnectionStringbuilder.cs
- UnsafeNativeMethodsMilCoreApi.cs
- ObservableCollection.cs
- ArcSegment.cs
- XmlCharCheckingWriter.cs
- ApplicationTrust.cs
- TimeoutConverter.cs
- OpenFileDialog.cs
- SqlDataSource.cs
- EmptyStringExpandableObjectConverter.cs
- SweepDirectionValidation.cs
- BamlResourceSerializer.cs
- IdentifierService.cs
- UIElementPropertyUndoUnit.cs
- LinkedResource.cs
- _OSSOCK.cs
- BindingGroup.cs
- ContactManager.cs
- OdbcCommand.cs
- IProducerConsumerCollection.cs
- LicenseContext.cs
- EDesignUtil.cs
- Image.cs
- RightsManagementEncryptedStream.cs
- Int32RectConverter.cs
- DataGridViewDataErrorEventArgs.cs
- _SpnDictionary.cs
- MachineKeyConverter.cs
- ConfigurationManagerHelper.cs
- ADMembershipProvider.cs
- ShaderEffect.cs
- BridgeDataReader.cs
- OleAutBinder.cs
- FocusWithinProperty.cs
- HttpHandlersSection.cs
- BitmapCodecInfoInternal.cs
- GridView.cs
- ToolStripPanelRow.cs
- ThreadInterruptedException.cs
- MemberPath.cs
- NavigationHelper.cs
- InfoCardArgumentException.cs
- DiscoveryServiceExtension.cs
- SqlGatherProducedAliases.cs
- GridViewCancelEditEventArgs.cs
- CoreSwitches.cs