Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / WebCategoryAttribute.cs / 1 / 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
- Object.cs
- FrameworkPropertyMetadata.cs
- HandledMouseEvent.cs
- StorageComplexTypeMapping.cs
- DoubleCollectionConverter.cs
- HwndSubclass.cs
- EntityContainer.cs
- HijriCalendar.cs
- GrammarBuilderDictation.cs
- ActiveXHelper.cs
- TextDpi.cs
- ContextMenuService.cs
- Transform3D.cs
- Item.cs
- NativeMethods.cs
- CharStorage.cs
- FormClosedEvent.cs
- DetailsViewPagerRow.cs
- Int64Storage.cs
- DbParameterCollectionHelper.cs
- ExpressionWriter.cs
- DependencyPropertyHelper.cs
- GenericEnumerator.cs
- VectorAnimationUsingKeyFrames.cs
- SafeMILHandle.cs
- DependencyPropertyKind.cs
- MasterPageCodeDomTreeGenerator.cs
- TransformedBitmap.cs
- BamlBinaryReader.cs
- DataGridViewCellStyleBuilderDialog.cs
- RoutedEventHandlerInfo.cs
- WebPartZoneCollection.cs
- EntityContainerEmitter.cs
- ReliabilityContractAttribute.cs
- DesignerLoader.cs
- UIElementParagraph.cs
- Table.cs
- AsymmetricAlgorithm.cs
- UmAlQuraCalendar.cs
- Underline.cs
- RenderOptions.cs
- InternalTypeHelper.cs
- SpeechSeg.cs
- _SslStream.cs
- _SslState.cs
- LowerCaseStringConverter.cs
- SpellerStatusTable.cs
- RequestCachePolicy.cs
- Facet.cs
- NamespaceEmitter.cs
- Calendar.cs
- AutomationProperties.cs
- DetailsViewInsertedEventArgs.cs
- Context.cs
- VirtualDirectoryMapping.cs
- TextElementCollection.cs
- DetailsViewInsertEventArgs.cs
- Pool.cs
- StateRuntime.cs
- EmbeddedMailObject.cs
- JsonSerializer.cs
- NestPullup.cs
- FileLogRecordEnumerator.cs
- TemplateColumn.cs
- ServerIdentity.cs
- filewebrequest.cs
- ViewManager.cs
- RemotingException.cs
- BmpBitmapDecoder.cs
- RuntimeWrappedException.cs
- AsymmetricAlgorithm.cs
- CollectionBuilder.cs
- PolicyException.cs
- WSDualHttpSecurityMode.cs
- XmlDocumentSchema.cs
- Activity.cs
- ToolBarButtonDesigner.cs
- BitmapVisualManager.cs
- SHA512.cs
- ListItemCollection.cs
- DuplicateWaitObjectException.cs
- shaper.cs
- CacheChildrenQuery.cs
- StorageMappingFragment.cs
- UnauthorizedAccessException.cs
- DtdParser.cs
- SelectionUIService.cs
- BufferBuilder.cs
- ProtocolsConfigurationEntry.cs
- AutomationPeer.cs
- BindingGroup.cs
- HtmlTableRowCollection.cs
- ReferenceConverter.cs
- OptimizedTemplateContent.cs
- CopyNodeSetAction.cs
- PipeSecurity.cs
- _SingleItemRequestCache.cs
- mediaeventshelper.cs
- HwndSourceParameters.cs
- ToolTipAutomationPeer.cs