Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / LocalizableAttribute.cs / 1 / 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
- ControlDesignerState.cs
- filewebrequest.cs
- WindowHideOrCloseTracker.cs
- ChooseAction.cs
- AsnEncodedData.cs
- XmlEntityReference.cs
- InlineUIContainer.cs
- GrammarBuilderRuleRef.cs
- DocumentSequenceHighlightLayer.cs
- TypeUsageBuilder.cs
- Converter.cs
- MsmqIntegrationProcessProtocolHandler.cs
- WindowsNonControl.cs
- CodeDomConfigurationHandler.cs
- NativeWindow.cs
- PrintEvent.cs
- FilterQueryOptionExpression.cs
- XmlUtil.cs
- Module.cs
- DataGridAutoFormat.cs
- DependencyPropertyChangedEventArgs.cs
- XmlComment.cs
- InheritedPropertyChangedEventArgs.cs
- RegularExpressionValidator.cs
- DataGridViewRowConverter.cs
- WebControlsSection.cs
- EntityDataSourceChangedEventArgs.cs
- NamespaceCollection.cs
- GeometryGroup.cs
- XmlToDatasetMap.cs
- MissingMethodException.cs
- OutKeywords.cs
- StringToken.cs
- Mouse.cs
- TextServicesProperty.cs
- TemplatePartAttribute.cs
- AsyncPostBackTrigger.cs
- DataGridViewCellConverter.cs
- SingleStorage.cs
- BlobPersonalizationState.cs
- Properties.cs
- SafeCryptContextHandle.cs
- WebBrowserSiteBase.cs
- SettingsBase.cs
- MergablePropertyAttribute.cs
- InputLanguageCollection.cs
- CancellationState.cs
- DetailsViewPageEventArgs.cs
- GeneralTransformGroup.cs
- CodeSnippetStatement.cs
- FormsAuthenticationUser.cs
- FileChangesMonitor.cs
- NumberFormatter.cs
- ClientBuildManagerCallback.cs
- AccessKeyManager.cs
- XPathDocumentBuilder.cs
- KeyGesture.cs
- GCHandleCookieTable.cs
- CheckPair.cs
- SqlAggregateChecker.cs
- NonValidatingSecurityTokenAuthenticator.cs
- Number.cs
- SqlFileStream.cs
- PersistencePipeline.cs
- DbConnectionPoolOptions.cs
- QueryException.cs
- StorageAssociationSetMapping.cs
- ComponentSerializationService.cs
- TypeToArgumentTypeConverter.cs
- FontCollection.cs
- DataGridViewEditingControlShowingEventArgs.cs
- ValidatingReaderNodeData.cs
- EdmComplexPropertyAttribute.cs
- MissingMethodException.cs
- WebPartTransformerAttribute.cs
- AnnotationElement.cs
- ResourceReferenceExpression.cs
- DoubleConverter.cs
- StatusBarItem.cs
- DataSourceHelper.cs
- Brush.cs
- DataControlFieldTypeEditor.cs
- HandlerBase.cs
- Attributes.cs
- DecoderReplacementFallback.cs
- URLEditor.cs
- ArcSegment.cs
- EventManager.cs
- CompositeDispatchFormatter.cs
- Stack.cs
- SendActivityEventArgs.cs
- DbMetaDataCollectionNames.cs
- AssociationTypeEmitter.cs
- PeerNameResolver.cs
- TreeView.cs
- ObjectQueryExecutionPlan.cs
- TraceProvider.cs
- StringUtil.cs
- SqlProviderServices.cs
- NavigatingCancelEventArgs.cs