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
- __ComObject.cs
- ValidationSummary.cs
- LoginView.cs
- RegularExpressionValidator.cs
- DataServiceEntityAttribute.cs
- ScriptingSectionGroup.cs
- MetadataItem.cs
- Grant.cs
- XmlAttributeCache.cs
- BitSet.cs
- StringFreezingAttribute.cs
- ExpressionLink.cs
- InteropExecutor.cs
- SecurityPermission.cs
- DataTrigger.cs
- ParagraphResult.cs
- XmlSchemaParticle.cs
- OpenFileDialog.cs
- JoinElimination.cs
- LogEntrySerializer.cs
- ObsoleteAttribute.cs
- TypeLoadException.cs
- RevocationPoint.cs
- WindowsTitleBar.cs
- UnhandledExceptionEventArgs.cs
- JapaneseCalendar.cs
- MapPathBasedVirtualPathProvider.cs
- LinqDataSourceValidationException.cs
- FormsAuthenticationTicket.cs
- TCPClient.cs
- SurrogateSelector.cs
- DbExpressionVisitor.cs
- TreeNodeConverter.cs
- MsdtcClusterUtils.cs
- ToolStripItemTextRenderEventArgs.cs
- WebBrowserNavigatingEventHandler.cs
- StringFreezingAttribute.cs
- BamlLocalizer.cs
- Parameter.cs
- AcceptorSessionSymmetricMessageSecurityProtocol.cs
- NetworkStream.cs
- EventTask.cs
- RadioButtonStandardAdapter.cs
- WebBrowserBase.cs
- TimeZone.cs
- NetCodeGroup.cs
- Literal.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- FunctionNode.cs
- RowsCopiedEventArgs.cs
- DesignConnectionCollection.cs
- CombinedGeometry.cs
- LocalServiceSecuritySettings.cs
- PixelFormat.cs
- serverconfig.cs
- SqlClientWrapperSmiStreamChars.cs
- FrameDimension.cs
- Win32Exception.cs
- CommandHelper.cs
- SettingsPropertyValueCollection.cs
- ScrollItemPatternIdentifiers.cs
- ToolStripItemCollection.cs
- RootContext.cs
- BuildProviderAppliesToAttribute.cs
- ChangeConflicts.cs
- ToolStripSystemRenderer.cs
- RawStylusSystemGestureInputReport.cs
- EmptyCollection.cs
- NamespaceCollection.cs
- ResourceProperty.cs
- ResourceContainer.cs
- userdatakeys.cs
- BitVector32.cs
- FlowDocumentPage.cs
- ClientSponsor.cs
- ParserHooks.cs
- Image.cs
- ModulesEntry.cs
- IndentedWriter.cs
- SafeSecurityHandles.cs
- VirtualDirectoryMapping.cs
- BasePropertyDescriptor.cs
- FilterEventArgs.cs
- HtmlHead.cs
- ClonableStack.cs
- ProxyWebPartManagerDesigner.cs
- ConfigXmlReader.cs
- DirectoryObjectSecurity.cs
- TypeLoadException.cs
- LineServicesRun.cs
- WorkflowInstanceRecord.cs
- BindingCompleteEventArgs.cs
- SqlProvider.cs
- HtmlTableRow.cs
- DSASignatureDeformatter.cs
- TextParagraphView.cs
- SoapFaultCodes.cs
- EntityDataSourceEntityTypeFilterItem.cs
- ResetableIterator.cs
- ComponentManagerBroker.cs