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
- MouseGestureConverter.cs
- TreeBuilderBamlTranslator.cs
- Debug.cs
- DbProviderFactories.cs
- AttachedPropertyDescriptor.cs
- NTAccount.cs
- UnmanagedMemoryStream.cs
- ThousandthOfEmRealPoints.cs
- MaterialGroup.cs
- PrintController.cs
- PrintDialog.cs
- DataGridViewCellMouseEventArgs.cs
- XmlBuffer.cs
- MemberInfoSerializationHolder.cs
- ToolStripSettings.cs
- PermissionToken.cs
- CalendarDay.cs
- sqlstateclientmanager.cs
- ScaleTransform.cs
- ListBoxAutomationPeer.cs
- PersistChildrenAttribute.cs
- Matrix.cs
- DataGridViewTextBoxEditingControl.cs
- COM2ComponentEditor.cs
- MemoryMappedViewAccessor.cs
- WindowsGraphics2.cs
- ScopelessEnumAttribute.cs
- exports.cs
- PersonalizationProviderHelper.cs
- Keywords.cs
- DateTimeConverter.cs
- Highlights.cs
- BitStream.cs
- WriteableBitmap.cs
- WorkflowTerminatedException.cs
- CodeBinaryOperatorExpression.cs
- ColorInterpolationModeValidation.cs
- GenericXmlSecurityToken.cs
- FontUnitConverter.cs
- Membership.cs
- Model3D.cs
- ClipboardProcessor.cs
- TextReader.cs
- SequentialUshortCollection.cs
- TokenBasedSet.cs
- __TransparentProxy.cs
- OutputCacheProfile.cs
- WebConfigurationFileMap.cs
- RegisteredHiddenField.cs
- BidOverLoads.cs
- NonVisualControlAttribute.cs
- AllMembershipCondition.cs
- GeometryGroup.cs
- SelfIssuedSamlTokenFactory.cs
- ResourceIDHelper.cs
- Merger.cs
- CapiSymmetricAlgorithm.cs
- RelativeSource.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- FieldMetadata.cs
- InfoCardRSACryptoProvider.cs
- EventLogPermissionEntry.cs
- ConditionCollection.cs
- PolyLineSegment.cs
- Unit.cs
- Part.cs
- FilePresentation.cs
- BinHexEncoder.cs
- OleCmdHelper.cs
- TlsnegoTokenAuthenticator.cs
- CultureMapper.cs
- RegexStringValidator.cs
- PublishLicense.cs
- SecurityProtocolFactory.cs
- DrawingAttributesDefaultValueFactory.cs
- GrammarBuilder.cs
- WebPartsSection.cs
- CodeGen.cs
- DurableInstanceContextProvider.cs
- SapiRecoInterop.cs
- SQLDateTimeStorage.cs
- XmlSchemaParticle.cs
- SiteMap.cs
- PaperSize.cs
- LogicalMethodInfo.cs
- Sql8ConformanceChecker.cs
- Helpers.cs
- Binding.cs
- BamlLocalizationDictionary.cs
- CodeDOMProvider.cs
- WindowsTokenRoleProvider.cs
- SecondaryIndexList.cs
- TypeConverterHelper.cs
- MissingSatelliteAssemblyException.cs
- BufferModesCollection.cs
- ASCIIEncoding.cs
- MediaTimeline.cs
- System.Data_BID.cs
- FileDocument.cs
- WmfPlaceableFileHeader.cs