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
- CompositeCollectionView.cs
- TranslateTransform3D.cs
- BaseCAMarshaler.cs
- InOutArgument.cs
- WizardPanel.cs
- DescendantOverDescendantQuery.cs
- SByteStorage.cs
- SqlUDTStorage.cs
- DataGridLength.cs
- WebPartDisplayModeCancelEventArgs.cs
- Transform3D.cs
- WorkflowTransactionService.cs
- ScriptResourceDefinition.cs
- ErrorFormatter.cs
- TemplatePartAttribute.cs
- VirtualPathUtility.cs
- EntityDataSourceWrapper.cs
- DownloadProgressEventArgs.cs
- recordstatescratchpad.cs
- SEHException.cs
- Column.cs
- PageVisual.cs
- DataServiceEntityAttribute.cs
- UnsafeNativeMethods.cs
- SmtpSection.cs
- Panel.cs
- AutoResizedEvent.cs
- WrapPanel.cs
- WebPartConnectionsCloseVerb.cs
- ErrorItem.cs
- WindowsFormsEditorServiceHelper.cs
- ResXBuildProvider.cs
- ConfigXmlCDataSection.cs
- TaskFactory.cs
- FileDialog_Vista_Interop.cs
- AspCompat.cs
- TableItemProviderWrapper.cs
- HybridDictionary.cs
- RelOps.cs
- ScriptDescriptor.cs
- DateTime.cs
- ProfileService.cs
- ActivitiesCollection.cs
- FixedBufferAttribute.cs
- SweepDirectionValidation.cs
- HtmlElementCollection.cs
- unitconverter.cs
- MarkupCompiler.cs
- NavigatorInput.cs
- HandlerMappingMemo.cs
- SerializerDescriptor.cs
- SslStream.cs
- RecordManager.cs
- NotSupportedException.cs
- Peer.cs
- EventLog.cs
- NavigationProperty.cs
- ZipIOCentralDirectoryFileHeader.cs
- LayoutDump.cs
- ZipFileInfoCollection.cs
- DBDataPermission.cs
- ObfuscateAssemblyAttribute.cs
- OledbConnectionStringbuilder.cs
- TraceContextEventArgs.cs
- PersonalizationAdministration.cs
- ListBindingConverter.cs
- CatalogPartChrome.cs
- ProviderSettingsCollection.cs
- ControlUtil.cs
- TableLayoutPanelCellPosition.cs
- AvTraceDetails.cs
- EventSinkHelperWriter.cs
- VariantWrapper.cs
- BitVector32.cs
- IntPtr.cs
- ManagementScope.cs
- QilXmlReader.cs
- UntrustedRecipientException.cs
- Update.cs
- RtfControls.cs
- FullTextLine.cs
- ColumnWidthChangedEvent.cs
- TreeNodeBindingCollection.cs
- ListViewInsertedEventArgs.cs
- NetworkCredential.cs
- DataGridViewCellStyleChangedEventArgs.cs
- MessagePartSpecification.cs
- ApplicationServiceHelper.cs
- ApplicationSecurityManager.cs
- XmlILAnnotation.cs
- PreparingEnlistment.cs
- COM2IDispatchConverter.cs
- WasNotInstalledException.cs
- HtmlGenericControl.cs
- FileBasedResourceGroveler.cs
- ElementsClipboardData.cs
- WebBrowserEvent.cs
- ContentWrapperAttribute.cs
- XmlNode.cs
- ConfigurationLockCollection.cs