Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- FixedPageStructure.cs
- EntityTypeBase.cs
- SafeTokenHandle.cs
- TagElement.cs
- SerializerDescriptor.cs
- TableChangeProcessor.cs
- TreeViewHitTestInfo.cs
- DataGridViewRow.cs
- EndpointNameMessageFilter.cs
- VirtualizingStackPanel.cs
- TableLayoutPanel.cs
- SerializationBinder.cs
- ResourceIDHelper.cs
- URI.cs
- SqlNotificationRequest.cs
- QuaternionRotation3D.cs
- FontInfo.cs
- SendActivityDesigner.cs
- PrintEvent.cs
- DesignOnlyAttribute.cs
- MatrixTransform3D.cs
- ConnectionStringsExpressionBuilder.cs
- HttpWebRequestElement.cs
- SR.cs
- EmptyCollection.cs
- UIPermission.cs
- XmlSchemaComplexContentRestriction.cs
- SimpleMailWebEventProvider.cs
- DataGridViewColumnEventArgs.cs
- InlineUIContainer.cs
- XmlSchemaAppInfo.cs
- DataTableMappingCollection.cs
- WebBrowser.cs
- EntityDescriptor.cs
- MobileFormsAuthentication.cs
- DetailsViewUpdateEventArgs.cs
- OracleParameterCollection.cs
- FramingChannels.cs
- ModelTreeEnumerator.cs
- UnaryNode.cs
- WasAdminWrapper.cs
- ComponentChangedEvent.cs
- ProcessModule.cs
- DelegatingConfigHost.cs
- BitmapEffectvisualstate.cs
- CellPartitioner.cs
- ToolboxComponentsCreatingEventArgs.cs
- EncoderNLS.cs
- httpstaticobjectscollection.cs
- DataBindingCollection.cs
- XPathBuilder.cs
- DeclarativeCatalogPart.cs
- Utils.cs
- ImageList.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- ObjectStateFormatter.cs
- ColorPalette.cs
- CharAnimationUsingKeyFrames.cs
- ResourceCodeDomSerializer.cs
- DefaultBindingPropertyAttribute.cs
- SupportsEventValidationAttribute.cs
- CacheDependency.cs
- JsonUriDataContract.cs
- Form.cs
- ImageDrawing.cs
- QueryContinueDragEventArgs.cs
- LoginView.cs
- GatewayDefinition.cs
- DataGridViewCellMouseEventArgs.cs
- ToolboxBitmapAttribute.cs
- ListViewDataItem.cs
- DataPagerCommandEventArgs.cs
- DataStreamFromComStream.cs
- ServicePointManagerElement.cs
- SatelliteContractVersionAttribute.cs
- FontFamilyValueSerializer.cs
- Group.cs
- CharAnimationUsingKeyFrames.cs
- CrossAppDomainChannel.cs
- dataprotectionpermission.cs
- PocoPropertyAccessorStrategy.cs
- Nullable.cs
- SimplePropertyEntry.cs
- ResourceIDHelper.cs
- ColumnMapVisitor.cs
- GroupQuery.cs
- DataSourceSelectArguments.cs
- ValidatingCollection.cs
- TimelineClockCollection.cs
- SplitContainerDesigner.cs
- XamlSerializerUtil.cs
- DataSourceIDConverter.cs
- ToolStripOverflowButton.cs
- SqlBulkCopyColumnMappingCollection.cs
- PolyBezierSegment.cs
- CodeDirectiveCollection.cs
- ComponentConverter.cs
- MenuItemCollection.cs
- FileLogRecordEnumerator.cs
- TextBounds.cs