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
- ServiceParser.cs
- NamespaceImport.cs
- CounterSetInstance.cs
- SmtpClient.cs
- MeasureData.cs
- DataSourceControl.cs
- AuthenticationModulesSection.cs
- StyleHelper.cs
- CustomSignedXml.cs
- listitem.cs
- followingquery.cs
- RegexBoyerMoore.cs
- ByteConverter.cs
- JsonEnumDataContract.cs
- SQLBytes.cs
- ProviderCommandInfoUtils.cs
- TextLineBreak.cs
- ProgressiveCrcCalculatingStream.cs
- TcpClientSocketManager.cs
- newinstructionaction.cs
- TextOptions.cs
- DataGrid.cs
- DataKeyCollection.cs
- UserControl.cs
- FontFamilyValueSerializer.cs
- VerticalAlignConverter.cs
- AnonymousIdentificationModule.cs
- LineBreak.cs
- HtmlInputSubmit.cs
- SmiConnection.cs
- EventLogPermission.cs
- CookielessHelper.cs
- JsonSerializer.cs
- PointConverter.cs
- Vector3DCollectionConverter.cs
- AffineTransform3D.cs
- BrowserDefinitionCollection.cs
- GenericIdentity.cs
- URIFormatException.cs
- BehaviorService.cs
- WebServiceHandlerFactory.cs
- XmlSchemaAnnotation.cs
- ACL.cs
- ContainerFilterService.cs
- EnumValidator.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- WinFormsSpinner.cs
- DSASignatureFormatter.cs
- Compiler.cs
- GenericsInstances.cs
- SessionState.cs
- TerminateWorkflow.cs
- StyleCollectionEditor.cs
- SettingsPropertyValueCollection.cs
- ContextQuery.cs
- XmlSerializationReader.cs
- SQLBinary.cs
- TouchPoint.cs
- AbsoluteQuery.cs
- TypeGeneratedEventArgs.cs
- SystemResources.cs
- Attributes.cs
- BinaryObjectInfo.cs
- DomNameTable.cs
- RectAnimationBase.cs
- Command.cs
- MemberListBinding.cs
- SecurityTokenProvider.cs
- IgnoreFlushAndCloseStream.cs
- ListBindingHelper.cs
- TabItemAutomationPeer.cs
- EditableRegion.cs
- EasingKeyFrames.cs
- EntityCodeGenerator.cs
- SiteMapDataSourceView.cs
- CodeAttachEventStatement.cs
- LoginName.cs
- EvidenceTypeDescriptor.cs
- RijndaelManaged.cs
- AmbiguousMatchException.cs
- NonParentingControl.cs
- WindowsPen.cs
- FileReservationCollection.cs
- Dump.cs
- WebPartDescription.cs
- JulianCalendar.cs
- ResourceExpressionEditorSheet.cs
- CatalogZoneBase.cs
- EventLogPermissionAttribute.cs
- TableRowCollection.cs
- SqlDuplicator.cs
- TryExpression.cs
- AdapterUtil.cs
- DataBoundControlHelper.cs
- BrowserCapabilitiesCompiler.cs
- PrePrepareMethodAttribute.cs
- DeleteHelper.cs
- ToolStripSystemRenderer.cs
- DefinitionBase.cs
- ConfigurationStrings.cs