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
- CssTextWriter.cs
- SecurityDescriptor.cs
- Win32MouseDevice.cs
- GroupBoxAutomationPeer.cs
- DecoderReplacementFallback.cs
- FormViewUpdatedEventArgs.cs
- SystemIPv6InterfaceProperties.cs
- PartitionerQueryOperator.cs
- ProfileProvider.cs
- FontTypeConverter.cs
- Literal.cs
- _SpnDictionary.cs
- TdsParserStateObject.cs
- ObjectResult.cs
- HelpKeywordAttribute.cs
- InvalidPrinterException.cs
- UshortList2.cs
- HwndKeyboardInputProvider.cs
- CodeSubDirectoriesCollection.cs
- SplitterEvent.cs
- DataServiceQueryOfT.cs
- Frame.cs
- DecimalAnimationUsingKeyFrames.cs
- CompiledRegexRunnerFactory.cs
- ModelFactory.cs
- SamlAssertionKeyIdentifierClause.cs
- TriState.cs
- QuaternionConverter.cs
- ReferenceSchema.cs
- ObjectSecurity.cs
- Timeline.cs
- CqlParserHelpers.cs
- PreProcessor.cs
- ThicknessAnimationBase.cs
- EventLogPermissionEntryCollection.cs
- CancellationTokenRegistration.cs
- AmbientLight.cs
- _ShellExpression.cs
- ConfigXmlText.cs
- AsyncPostBackErrorEventArgs.cs
- ISO2022Encoding.cs
- ComponentEvent.cs
- SizeChangedEventArgs.cs
- selecteditemcollection.cs
- Package.cs
- TranslateTransform3D.cs
- XmlBaseReader.cs
- ConnectionPoint.cs
- ConfigurationLocationCollection.cs
- CharacterBufferReference.cs
- RegisteredExpandoAttribute.cs
- RegexGroup.cs
- TdsRecordBufferSetter.cs
- remotingproxy.cs
- Processor.cs
- TextEditor.cs
- FixedSOMPageElement.cs
- UiaCoreProviderApi.cs
- SubMenuStyle.cs
- ByteFacetDescriptionElement.cs
- TransactionScope.cs
- StyleBamlTreeBuilder.cs
- RequestTimeoutManager.cs
- CaseInsensitiveComparer.cs
- SharedPerformanceCounter.cs
- DataContractJsonSerializerOperationBehavior.cs
- EntityDataSourceState.cs
- ConfigurationLoaderException.cs
- ListViewContainer.cs
- LogLogRecord.cs
- Parsers.cs
- DataIdProcessor.cs
- IntSecurity.cs
- LinkDesigner.cs
- HopperCache.cs
- SvcMapFileLoader.cs
- precedingsibling.cs
- SkipQueryOptionExpression.cs
- SessionPageStatePersister.cs
- SchemaNames.cs
- SessionParameter.cs
- xsdvalidator.cs
- HttpVersion.cs
- ResourcePart.cs
- BlobPersonalizationState.cs
- SoapInteropTypes.cs
- ListGeneralPage.cs
- XamlWrappingReader.cs
- SqlTopReducer.cs
- CodeIdentifier.cs
- ContextDataSourceView.cs
- HtmlSelectionListAdapter.cs
- ExceptionAggregator.cs
- VSWCFServiceContractGenerator.cs
- UnionCqlBlock.cs
- BooleanAnimationBase.cs
- ValueUtilsSmi.cs
- HeaderElement.cs
- FlatButtonAppearance.cs
- ObservableCollectionDefaultValueFactory.cs