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
- Math.cs
- UserNamePasswordValidator.cs
- TabControl.cs
- AppSettingsSection.cs
- XMLSchema.cs
- SessionPageStateSection.cs
- ArcSegment.cs
- HwndProxyElementProvider.cs
- NativeObjectSecurity.cs
- Interlocked.cs
- GradientStop.cs
- CodeSnippetTypeMember.cs
- HttpProxyTransportBindingElement.cs
- ComPlusDiagnosticTraceSchemas.cs
- RegexCaptureCollection.cs
- NativeMethodsCLR.cs
- ArraySortHelper.cs
- NavigatorInput.cs
- ConfigurationLocationCollection.cs
- StylusTouchDevice.cs
- IConvertible.cs
- CheckBoxField.cs
- XmlUtilWriter.cs
- ParameterModifier.cs
- ClientTargetCollection.cs
- AssemblyCache.cs
- ConfigXmlReader.cs
- Int32AnimationBase.cs
- PageCache.cs
- Rotation3D.cs
- BinaryObjectWriter.cs
- FormViewPageEventArgs.cs
- ArgumentOutOfRangeException.cs
- MULTI_QI.cs
- AttributeAction.cs
- FindCriteriaApril2005.cs
- RuntimeVariableList.cs
- DbParameterCollectionHelper.cs
- SecurityContext.cs
- ResolveNameEventArgs.cs
- AxHost.cs
- WorkflowServiceBuildProvider.cs
- SecurityTokenSerializer.cs
- SessionState.cs
- CellTreeNodeVisitors.cs
- TreeIterator.cs
- dataprotectionpermission.cs
- EndpointInfo.cs
- PageHandlerFactory.cs
- Constraint.cs
- StateWorkerRequest.cs
- DataColumnMapping.cs
- PanelStyle.cs
- SelectionProviderWrapper.cs
- HotCommands.cs
- ControlCachePolicy.cs
- ChangeTracker.cs
- WpfXamlMember.cs
- FocusTracker.cs
- VisualTransition.cs
- DataServiceException.cs
- JournalEntryStack.cs
- CombinedGeometry.cs
- ProfileInfo.cs
- PropertyFilter.cs
- GZipDecoder.cs
- FlowNode.cs
- DuplicateWaitObjectException.cs
- SoapParser.cs
- recordstatefactory.cs
- Enlistment.cs
- SerialErrors.cs
- AssertSection.cs
- Rights.cs
- AttributeInfo.cs
- PluggableProtocol.cs
- ApplicationFileParser.cs
- _KerberosClient.cs
- Typography.cs
- WindowsTooltip.cs
- Avt.cs
- FileDialogPermission.cs
- Point3DCollection.cs
- MemoryMappedFileSecurity.cs
- RootBrowserWindow.cs
- OleDbFactory.cs
- _BasicClient.cs
- SystemNetworkInterface.cs
- DoubleAnimationBase.cs
- DataObjectFieldAttribute.cs
- SafeThreadHandle.cs
- TableDetailsCollection.cs
- TableSectionStyle.cs
- NonClientArea.cs
- AuthenticationModuleElement.cs
- __Filters.cs
- NavigationWindowAutomationPeer.cs
- DocumentViewer.cs
- UnsafeNativeMethods.cs
- AnalyzedTree.cs