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
- SystemFonts.cs
- BinaryReader.cs
- XmlLoader.cs
- RecordBuilder.cs
- EntityProviderServices.cs
- BulletedList.cs
- SecurityHeaderTokenResolver.cs
- ByeOperationCD1AsyncResult.cs
- BatchServiceHost.cs
- ParameterRetriever.cs
- DataTablePropertyDescriptor.cs
- PersonalizationStateInfoCollection.cs
- APCustomTypeDescriptor.cs
- TypeRefElement.cs
- FailedToStartupUIException.cs
- DataGridViewCell.cs
- RangeValueProviderWrapper.cs
- UnknownBitmapDecoder.cs
- ZipFileInfo.cs
- AdjustableArrowCap.cs
- CornerRadiusConverter.cs
- HandlerFactoryWrapper.cs
- MultiBindingExpression.cs
- TriggerActionCollection.cs
- EqualityComparer.cs
- DataGridViewColumnCollection.cs
- FormViewRow.cs
- CodeCastExpression.cs
- ServiceDiscoveryBehavior.cs
- DbDataReader.cs
- AddingNewEventArgs.cs
- CustomErrorsSection.cs
- PaginationProgressEventArgs.cs
- SByteConverter.cs
- RemoteArgument.cs
- NavigationPropertyEmitter.cs
- ADRoleFactory.cs
- RectAnimationUsingKeyFrames.cs
- Rotation3DAnimation.cs
- Model3D.cs
- BooleanProjectedSlot.cs
- PixelShader.cs
- SizeKeyFrameCollection.cs
- XmlnsDictionary.cs
- XmlSchemaType.cs
- XPathAncestorQuery.cs
- UpdatePanelControlTrigger.cs
- ZipIOExtraFieldPaddingElement.cs
- DES.cs
- coordinatorfactory.cs
- DataControlPagerLinkButton.cs
- Label.cs
- ListBindingHelper.cs
- EntityDataSourceChangingEventArgs.cs
- TableNameAttribute.cs
- TextRangeAdaptor.cs
- GradientSpreadMethodValidation.cs
- ReadOnlyCollection.cs
- IntegrationExceptionEventArgs.cs
- ComponentResourceKeyConverter.cs
- SmtpAuthenticationManager.cs
- AudioSignalProblemOccurredEventArgs.cs
- RawContentTypeMapper.cs
- FontNamesConverter.cs
- BasicExpandProvider.cs
- remotingproxy.cs
- EventsTab.cs
- InternalResources.cs
- VisualBasicHelper.cs
- LineMetrics.cs
- FixedNode.cs
- SocketException.cs
- ProfileBuildProvider.cs
- Profiler.cs
- ScrollViewer.cs
- EntityDesignerDataSourceView.cs
- XmlSchemaInferenceException.cs
- ParamArrayAttribute.cs
- CustomLineCap.cs
- MouseBinding.cs
- ModulesEntry.cs
- ValidationSummary.cs
- VerticalAlignConverter.cs
- StringArrayConverter.cs
- ColorDialog.cs
- ImageListImage.cs
- xamlnodes.cs
- ValueOfAction.cs
- ExternalCalls.cs
- ReaderWriterLock.cs
- XmlAnyElementAttribute.cs
- _ListenerResponseStream.cs
- SourceItem.cs
- PackageDigitalSignature.cs
- EntityDataSourceViewSchema.cs
- IntSecurity.cs
- BitmapEffectDrawingContent.cs
- Rule.cs
- DataSourceComponent.cs
- XmlDataLoader.cs