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;
///
/// Specifies whether a property should be localized.
///
[AttributeUsage(AttributeTargets.All)]
public sealed class LocalizableAttribute : Attribute {
private bool isLocalizable = false;
///
///
/// Initializes a new instance of the class.
///
///
public LocalizableAttribute(bool isLocalizable) {
this.isLocalizable = isLocalizable;
}
///
///
/// Gets a value indicating whether
/// a property should be localized.
///
///
public bool IsLocalizable {
get {
return isLocalizable;
}
}
///
///
/// Specifies that a property should be localized. This
/// field is read-only.
///
///
public static readonly LocalizableAttribute Yes = new LocalizableAttribute(true);
///
///
/// Specifies that a property should not be localized. This
/// field is read-only.
///
///
public static readonly LocalizableAttribute No = new LocalizableAttribute(false);
///
///
/// Specifies the default value, which is , that is
/// a property should not be localized. This field is
/// read-only.
///
///
public static readonly LocalizableAttribute Default = No;
///
///
///
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;
///
/// Specifies whether a property should be localized.
///
[AttributeUsage(AttributeTargets.All)]
public sealed class LocalizableAttribute : Attribute {
private bool isLocalizable = false;
///
///
/// Initializes a new instance of the class.
///
///
public LocalizableAttribute(bool isLocalizable) {
this.isLocalizable = isLocalizable;
}
///
///
/// Gets a value indicating whether
/// a property should be localized.
///
///
public bool IsLocalizable {
get {
return isLocalizable;
}
}
///
///
/// Specifies that a property should be localized. This
/// field is read-only.
///
///
public static readonly LocalizableAttribute Yes = new LocalizableAttribute(true);
///
///
/// Specifies that a property should not be localized. This
/// field is read-only.
///
///
public static readonly LocalizableAttribute No = new LocalizableAttribute(false);
///
///
/// Specifies the default value, which is , that is
/// a property should not be localized. This field is
/// read-only.
///
///
public static readonly LocalizableAttribute Default = No;
///
///
///
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
- StringCollection.cs
- AutomationPatternInfo.cs
- XmlTextReaderImpl.cs
- QueryResponse.cs
- DocumentReference.cs
- FamilyTypefaceCollection.cs
- DataGridViewColumnEventArgs.cs
- DomainUpDown.cs
- XmlDeclaration.cs
- ColumnHeader.cs
- QilParameter.cs
- EntityDataSourceWrapper.cs
- Type.cs
- PngBitmapDecoder.cs
- FactoryGenerator.cs
- Environment.cs
- ErrorEventArgs.cs
- InvalidComObjectException.cs
- BaseCollection.cs
- KeyInterop.cs
- WebPart.cs
- SingletonInstanceContextProvider.cs
- ColorBlend.cs
- CompilerTypeWithParams.cs
- InvariantComparer.cs
- PieceDirectory.cs
- Point3DCollection.cs
- SqlXml.cs
- GeometryModel3D.cs
- OracleParameterCollection.cs
- ToolConsole.cs
- XmlDataSourceNodeDescriptor.cs
- WindowsSolidBrush.cs
- XmlAutoDetectWriter.cs
- SoapAttributes.cs
- ResponseBodyWriter.cs
- Enum.cs
- OverlappedAsyncResult.cs
- IPAddress.cs
- FixedStringLookup.cs
- EventMappingSettingsCollection.cs
- SendingRequestEventArgs.cs
- Pen.cs
- PathFigureCollectionValueSerializer.cs
- HtmlInputFile.cs
- SqlProviderServices.cs
- LocatorGroup.cs
- CodeTypeReference.cs
- PageBreakRecord.cs
- XPathNodeHelper.cs
- FunctionImportElement.cs
- PersonalizationProvider.cs
- WebMessageEncodingBindingElement.cs
- DropShadowBitmapEffect.cs
- HttpCookieCollection.cs
- Typography.cs
- ProfilePropertyNameValidator.cs
- ClosableStream.cs
- Options.cs
- VariantWrapper.cs
- DayRenderEvent.cs
- XmlUtf8RawTextWriter.cs
- XmlSchemaObjectCollection.cs
- PointHitTestParameters.cs
- XmlnsDictionary.cs
- SecUtil.cs
- PersonalizationProvider.cs
- DbDataRecord.cs
- UrlAuthFailedErrorFormatter.cs
- GenericRootAutomationPeer.cs
- PathNode.cs
- AxWrapperGen.cs
- DataGridBoolColumn.cs
- SamlEvidence.cs
- XmlElement.cs
- WmiEventSink.cs
- ValueUtilsSmi.cs
- OracleFactory.cs
- Point3DCollection.cs
- ReferenceEqualityComparer.cs
- SecurityPermission.cs
- _ContextAwareResult.cs
- Point3DAnimationUsingKeyFrames.cs
- TextEffectResolver.cs
- HttpApplication.cs
- XmlElement.cs
- SubMenuStyleCollection.cs
- ListBoxChrome.cs
- ItemCheckedEvent.cs
- GenericTypeParameterBuilder.cs
- PerformanceCountersElement.cs
- CngAlgorithmGroup.cs
- XmlDeclaration.cs
- WindowsListBox.cs
- Mouse.cs
- Recipient.cs
- InitializationEventAttribute.cs
- SmiConnection.cs
- ExpressionBuilder.cs
- MobileControlPersister.cs