Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / LocalizableAttribute.cs / 1305376 / LocalizableAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class LocalizableAttribute : Attribute { private bool isLocalizable = false; ///Specifies whether a property should be localized. ////// public LocalizableAttribute(bool isLocalizable) { this.isLocalizable = isLocalizable; } ////// Initializes a new instance of the ///class. /// /// public bool IsLocalizable { get { return isLocalizable; } } ////// Gets a value indicating whether /// a property should be localized. /// ////// public static readonly LocalizableAttribute Yes = new LocalizableAttribute(true); ////// Specifies that a property should be localized. This /// ///field is read-only. /// /// public static readonly LocalizableAttribute No = new LocalizableAttribute(false); ////// Specifies that a property should not be localized. This /// ///field is read-only. /// /// public static readonly LocalizableAttribute Default = No; ////// Specifies the default value, which is ///, that is /// a property should not be localized. This field is /// read-only. /// /// /// public override bool IsDefaultAttribute() { return (IsLocalizable == Default.IsLocalizable); } public override bool Equals(object obj) { LocalizableAttribute other = obj as LocalizableAttribute; return (other != null) && other.IsLocalizable == this.isLocalizable; } public override int GetHashCode() { return base.GetHashCode(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class LocalizableAttribute : Attribute { private bool isLocalizable = false; ///Specifies whether a property should be localized. ////// public LocalizableAttribute(bool isLocalizable) { this.isLocalizable = isLocalizable; } ////// Initializes a new instance of the ///class. /// /// public bool IsLocalizable { get { return isLocalizable; } } ////// Gets a value indicating whether /// a property should be localized. /// ////// public static readonly LocalizableAttribute Yes = new LocalizableAttribute(true); ////// Specifies that a property should be localized. This /// ///field is read-only. /// /// public static readonly LocalizableAttribute No = new LocalizableAttribute(false); ////// Specifies that a property should not be localized. This /// ///field is read-only. /// /// public static readonly LocalizableAttribute Default = No; ////// Specifies the default value, which is ///, that is /// a property should not be localized. This field is /// read-only. /// /// /// public override bool IsDefaultAttribute() { return (IsLocalizable == Default.IsLocalizable); } public override bool Equals(object obj) { LocalizableAttribute other = obj as LocalizableAttribute; return (other != null) && other.IsLocalizable == this.isLocalizable; } public override int GetHashCode() { return base.GetHashCode(); } } } // 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
- Util.cs
- WCFBuildProvider.cs
- FontSourceCollection.cs
- DbConnectionFactory.cs
- SectionInput.cs
- TextEditorMouse.cs
- CompatibleComparer.cs
- SessionPageStatePersister.cs
- Blend.cs
- ACL.cs
- DrawingBrush.cs
- BitmapEffectDrawing.cs
- ReadWriteObjectLock.cs
- DaylightTime.cs
- PlatformNotSupportedException.cs
- ExceptionHelpers.cs
- SQLDecimalStorage.cs
- XslException.cs
- ControlBuilderAttribute.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- TaskExtensions.cs
- WebServiceAttribute.cs
- DesigntimeLicenseContext.cs
- XsdDataContractExporter.cs
- StructuredType.cs
- AsyncContentLoadedEventArgs.cs
- TableAutomationPeer.cs
- WorkflowPersistenceContext.cs
- FamilyTypeface.cs
- Content.cs
- KeyGestureValueSerializer.cs
- JsonFormatGeneratorStatics.cs
- followingquery.cs
- PreviewPrintController.cs
- SharedDp.cs
- RowVisual.cs
- DesigntimeLicenseContextSerializer.cs
- InkCanvasFeedbackAdorner.cs
- TreeWalkHelper.cs
- objectquery_tresulttype.cs
- SafeHandle.cs
- EditingCoordinator.cs
- SafeWaitHandle.cs
- Stackframe.cs
- FamilyMap.cs
- XhtmlConformanceSection.cs
- ExpressionVisitor.cs
- DesignerCalendarAdapter.cs
- ReferencedType.cs
- Matrix.cs
- TemplatedAdorner.cs
- InvokeBinder.cs
- CTreeGenerator.cs
- GeometryHitTestResult.cs
- RegexCapture.cs
- PolyQuadraticBezierSegment.cs
- IndexerNameAttribute.cs
- MetaModel.cs
- Underline.cs
- ResXResourceReader.cs
- EncryptedData.cs
- BasicKeyConstraint.cs
- DeviceContexts.cs
- FileSystemInfo.cs
- ListComponentEditorPage.cs
- FormattedText.cs
- QueryServiceConfigHandle.cs
- WeakReferenceList.cs
- HashStream.cs
- ToolboxBitmapAttribute.cs
- XmlAttribute.cs
- Globals.cs
- XmlSchemaParticle.cs
- XhtmlBasicPageAdapter.cs
- CellTreeNode.cs
- AnnotationResourceCollection.cs
- ApplicationManager.cs
- WindowsFormsHostAutomationPeer.cs
- InputBinding.cs
- DataContext.cs
- HttpHeaderCollection.cs
- WindowsListViewItem.cs
- SqlSupersetValidator.cs
- XPathItem.cs
- Point3DAnimationBase.cs
- HostSecurityManager.cs
- DiscoveryReference.cs
- BezierSegment.cs
- NameValuePermission.cs
- TextEmbeddedObject.cs
- ImageFormat.cs
- GroupBoxRenderer.cs
- SubMenuStyle.cs
- IxmlLineInfo.cs
- TrailingSpaceComparer.cs
- AssignDesigner.xaml.cs
- NameValuePair.cs
- AppearanceEditorPart.cs
- Stylesheet.cs
- HtmlTableCell.cs