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
- DesignTimeVisibleAttribute.cs
- Trace.cs
- SigningProgress.cs
- ApplicationManager.cs
- ZoneIdentityPermission.cs
- ExceptionTrace.cs
- TextTreeText.cs
- AssemblyBuilder.cs
- DataControlLinkButton.cs
- XmlSecureResolver.cs
- CodeConstructor.cs
- unsafenativemethodstextservices.cs
- DbConvert.cs
- PropertyPath.cs
- XamlFilter.cs
- Style.cs
- Enum.cs
- IPPacketInformation.cs
- ColorMap.cs
- PerformanceCounter.cs
- LicenseException.cs
- TypeConverterAttribute.cs
- VerificationException.cs
- InkPresenter.cs
- HostingPreferredMapPath.cs
- CmsInterop.cs
- ListItemConverter.cs
- _AutoWebProxyScriptWrapper.cs
- XmlNodeChangedEventManager.cs
- CodeExporter.cs
- EntityConnection.cs
- RectIndependentAnimationStorage.cs
- ListDependantCardsRequest.cs
- PropertyChangedEventManager.cs
- DirectionalLight.cs
- DllNotFoundException.cs
- CodeFieldReferenceExpression.cs
- ServiceMoniker.cs
- EntityDataSourceSelectedEventArgs.cs
- XmlSchemaProviderAttribute.cs
- EditorZone.cs
- DesignTimeVisibleAttribute.cs
- TypeNameConverter.cs
- DocumentEventArgs.cs
- Vector3DAnimationBase.cs
- Odbc32.cs
- HtmlElementEventArgs.cs
- XmlSchemaGroup.cs
- PageCodeDomTreeGenerator.cs
- CatalogZone.cs
- ResourcePool.cs
- XmlSchemaExternal.cs
- WindowsFormsHelpers.cs
- GeneralTransformCollection.cs
- PasswordValidationException.cs
- FastEncoderWindow.cs
- SqlSelectStatement.cs
- IISUnsafeMethods.cs
- SqlCachedBuffer.cs
- DocumentSequenceHighlightLayer.cs
- StylusOverProperty.cs
- MethodBody.cs
- HttpClientCertificate.cs
- UnsafeNativeMethods.cs
- MethodImplAttribute.cs
- FileSystemWatcher.cs
- Events.cs
- TextModifierScope.cs
- NumberFormatInfo.cs
- ToolTip.cs
- DllNotFoundException.cs
- InstanceKeyView.cs
- FilterElement.cs
- CurrentChangingEventArgs.cs
- DataSetUtil.cs
- AliasGenerator.cs
- SemanticBasicElement.cs
- HideDisabledControlAdapter.cs
- DataGridHeaderBorder.cs
- FormsAuthenticationModule.cs
- OracleTimeSpan.cs
- LicenseException.cs
- DialogDivider.cs
- TextTreeTextElementNode.cs
- XomlCompilerParameters.cs
- FileDataSourceCache.cs
- CustomCategoryAttribute.cs
- PerfCounters.cs
- MultiView.cs
- TaiwanCalendar.cs
- BamlCollectionHolder.cs
- SynchronizationLockException.cs
- QilCloneVisitor.cs
- ReceiveParametersContent.cs
- HMACSHA1.cs
- SerialPort.cs
- Rule.cs
- CollectionBuilder.cs
- XsltInput.cs
- GradientStop.cs