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
- OnOperation.cs
- DynamicQueryStringParameter.cs
- GeneralTransform3DTo2DTo3D.cs
- WindowAutomationPeer.cs
- CodeEntryPointMethod.cs
- DllNotFoundException.cs
- Transform.cs
- IconHelper.cs
- HybridDictionary.cs
- InputScope.cs
- RegistryPermission.cs
- DrawingContextDrawingContextWalker.cs
- CornerRadiusConverter.cs
- BuilderPropertyEntry.cs
- DeflateEmulationStream.cs
- EventRouteFactory.cs
- TextElementEditingBehaviorAttribute.cs
- BooleanFacetDescriptionElement.cs
- StorageSetMapping.cs
- DependencyProperty.cs
- SharedStatics.cs
- HttpGetServerProtocol.cs
- StyleSheetDesigner.cs
- CompiledELinqQueryState.cs
- DetailsView.cs
- PersonalizationProviderCollection.cs
- APCustomTypeDescriptor.cs
- ReflectionTypeLoadException.cs
- NativeMethods.cs
- Accessible.cs
- CallContext.cs
- RTLAwareMessageBox.cs
- XmlQueryStaticData.cs
- WinFormsUtils.cs
- WindowsFormsHelpers.cs
- CounterSampleCalculator.cs
- RemotingConfiguration.cs
- DataViewSettingCollection.cs
- Int32CAMarshaler.cs
- MimeReflector.cs
- ICspAsymmetricAlgorithm.cs
- DBBindings.cs
- CodeCompileUnit.cs
- InfoCardKeyedHashAlgorithm.cs
- InternalSafeNativeMethods.cs
- SectionInformation.cs
- SoapEnumAttribute.cs
- SendMailErrorEventArgs.cs
- DbConnectionHelper.cs
- Vars.cs
- COM2EnumConverter.cs
- Statements.cs
- FileDialog_Vista_Interop.cs
- ResourceManager.cs
- CodeMemberField.cs
- QueryContinueDragEvent.cs
- DSASignatureFormatter.cs
- SqlConnectionPoolGroupProviderInfo.cs
- EntityViewContainer.cs
- MexTcpBindingElement.cs
- OracleSqlParser.cs
- Pair.cs
- NativeMethods.cs
- DataSourceExpression.cs
- Panel.cs
- RectangleGeometry.cs
- DetailsViewRowCollection.cs
- HMACSHA384.cs
- AdapterUtil.cs
- WpfKnownMember.cs
- ContentAlignmentEditor.cs
- Debug.cs
- KnownColorTable.cs
- DataColumnMapping.cs
- DataServiceOperationContext.cs
- WmlPanelAdapter.cs
- LogicalExpressionEditor.cs
- MappingSource.cs
- DataGridViewComponentPropertyGridSite.cs
- TextRangeEdit.cs
- MenuCommand.cs
- ListViewEditEventArgs.cs
- Group.cs
- CaseInsensitiveHashCodeProvider.cs
- GrammarBuilderBase.cs
- ChannelDemuxer.cs
- ImageCreator.cs
- CryptoKeySecurity.cs
- DiagnosticsConfiguration.cs
- SqlCachedBuffer.cs
- PerformanceCounterPermissionEntry.cs
- CharKeyFrameCollection.cs
- ControlTemplate.cs
- DbConvert.cs
- SqlClientPermission.cs
- SynchronizingStream.cs
- PropertySegmentSerializer.cs
- DropDownList.cs
- UnsafeNativeMethods.cs
- SqlProvider.cs