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
- SocketAddress.cs
- SelectionRange.cs
- TextRangeBase.cs
- DefaultTraceListener.cs
- StringComparer.cs
- TemplateControl.cs
- CaseInsensitiveOrdinalStringComparer.cs
- UserControl.cs
- BackStopAuthenticationModule.cs
- SizeAnimationUsingKeyFrames.cs
- ExecutionPropertyManager.cs
- ConfigPathUtility.cs
- ListItem.cs
- MultiAsyncResult.cs
- DependencyObjectProvider.cs
- DefaultMergeHelper.cs
- SwitchElementsCollection.cs
- WebPartPersonalization.cs
- QilLiteral.cs
- SmtpMail.cs
- StreamReader.cs
- QuaternionRotation3D.cs
- DbProviderFactories.cs
- EntityDataSourceQueryBuilder.cs
- JavaScriptString.cs
- CommandLibraryHelper.cs
- Viewport3DVisual.cs
- CompilerCollection.cs
- DelayedRegex.cs
- IndexedEnumerable.cs
- BitmapEffectDrawing.cs
- ProfileGroupSettings.cs
- IOException.cs
- MimeMapping.cs
- XmlAutoDetectWriter.cs
- DeferredSelectedIndexReference.cs
- TcpWorkerProcess.cs
- WebEventTraceProvider.cs
- ExpressionBindings.cs
- DeferredSelectedIndexReference.cs
- SafeEventHandle.cs
- ArrayWithOffset.cs
- CompressStream.cs
- XmlSchemaObject.cs
- ConfigXmlSignificantWhitespace.cs
- Interlocked.cs
- basevalidator.cs
- WebPartCloseVerb.cs
- HtmlDocument.cs
- WizardForm.cs
- AlternationConverter.cs
- CodeGeneratorOptions.cs
- ThreadStartException.cs
- DBConnectionString.cs
- CodeDomDesignerLoader.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- MouseEventArgs.cs
- QueryInterceptorAttribute.cs
- UpdateTracker.cs
- PeerUnsafeNativeCryptMethods.cs
- CapabilitiesSection.cs
- GeometryConverter.cs
- ForeignKeyConstraint.cs
- UidPropertyAttribute.cs
- OdbcReferenceCollection.cs
- NativeObjectSecurity.cs
- ListBoxAutomationPeer.cs
- SpecialTypeDataContract.cs
- precedingsibling.cs
- RowToParametersTransformer.cs
- EventInfo.cs
- XmlTypeAttribute.cs
- DataGridViewRowStateChangedEventArgs.cs
- SimpleWorkerRequest.cs
- RegexCompiler.cs
- TrackingRecordPreFilter.cs
- SecurityAlgorithmSuiteConverter.cs
- SmtpMail.cs
- TargetFrameworkAttribute.cs
- TextSegment.cs
- DynamicMetaObject.cs
- ClassicBorderDecorator.cs
- ResumeStoryboard.cs
- WebPartDisplayModeEventArgs.cs
- SHA384CryptoServiceProvider.cs
- PrimaryKeyTypeConverter.cs
- TemplatePropertyEntry.cs
- Vector3DKeyFrameCollection.cs
- BorderGapMaskConverter.cs
- CodeAttachEventStatement.cs
- QilPatternFactory.cs
- Image.cs
- Match.cs
- CheckPair.cs
- FixedPage.cs
- TagMapCollection.cs
- DbgCompiler.cs
- RSAPKCS1SignatureDeformatter.cs
- PointAnimationBase.cs
- ServicesUtilities.cs