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
- SiteMap.cs
- ControlParameter.cs
- SecurityContext.cs
- DrawingVisualDrawingContext.cs
- ObjectViewFactory.cs
- WebBrowserSiteBase.cs
- BuilderPropertyEntry.cs
- ObjectSecurity.cs
- DrawingContextDrawingContextWalker.cs
- FastPropertyAccessor.cs
- UnsafeNativeMethods.cs
- FrameworkContextData.cs
- PolyLineSegment.cs
- URLIdentityPermission.cs
- FixedSOMPageConstructor.cs
- ConnectionProviderAttribute.cs
- hwndwrapper.cs
- Set.cs
- FastPropertyAccessor.cs
- HttpApplication.cs
- ResourcesChangeInfo.cs
- Pair.cs
- GeneratedContractType.cs
- LocatorManager.cs
- AxisAngleRotation3D.cs
- SqlFileStream.cs
- XmlElementCollection.cs
- AnnotationHelper.cs
- ScriptingProfileServiceSection.cs
- FixedFindEngine.cs
- DeferredSelectedIndexReference.cs
- DataGridState.cs
- _HeaderInfo.cs
- RowParagraph.cs
- SamlAuthorizationDecisionClaimResource.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- LicenseContext.cs
- UnrecognizedAssertionsBindingElement.cs
- DetailsViewPagerRow.cs
- bidPrivateBase.cs
- PeerHelpers.cs
- OperationAbortedException.cs
- CryptoApi.cs
- keycontainerpermission.cs
- ProcessRequestArgs.cs
- IsolatedStorageException.cs
- DropDownButton.cs
- TypeDescriptorFilterService.cs
- BitmapEffectCollection.cs
- XmlDocumentType.cs
- HashMembershipCondition.cs
- SubMenuStyleCollection.cs
- XmlQueryContext.cs
- Error.cs
- MetroSerializationManager.cs
- BoolLiteral.cs
- IndexedString.cs
- _LocalDataStore.cs
- GeometryHitTestResult.cs
- TypeElementCollection.cs
- UriScheme.cs
- EntityCommandDefinition.cs
- VariableQuery.cs
- WebRequestModuleElement.cs
- ActivityContext.cs
- RequestCachingSection.cs
- ReadOnlyDictionary.cs
- MemoryMappedFileSecurity.cs
- ExtensibleClassFactory.cs
- DefaultBinder.cs
- ListViewInsertedEventArgs.cs
- TextViewBase.cs
- CustomAttributeFormatException.cs
- RoleGroupCollection.cs
- ToolBar.cs
- CoreSwitches.cs
- BatchWriter.cs
- ConnectionPointCookie.cs
- EncryptedData.cs
- DataBinder.cs
- TextSelectionProcessor.cs
- CodeTypeReferenceCollection.cs
- MetadataItemEmitter.cs
- SafeEventHandle.cs
- FastPropertyAccessor.cs
- FixedPage.cs
- PropertyCondition.cs
- SimpleFieldTemplateUserControl.cs
- DataGridViewDesigner.cs
- XmlChildNodes.cs
- SubqueryRules.cs
- Italic.cs
- WebBrowsableAttribute.cs
- ConfigsHelper.cs
- SystemIPGlobalStatistics.cs
- ProfileEventArgs.cs
- SqlConnectionFactory.cs
- UpdateTranslator.cs
- ListViewDataItem.cs
- FrameworkContentElement.cs