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
- PrintPreviewControl.cs
- SQLBytesStorage.cs
- MemberProjectionIndex.cs
- WindowsTokenRoleProvider.cs
- ModuleBuilderData.cs
- SqlError.cs
- BridgeDataRecord.cs
- TextTreeFixupNode.cs
- HotSpot.cs
- AuthenticationService.cs
- SessionPageStateSection.cs
- PageStatePersister.cs
- SqlMethodCallConverter.cs
- XMLUtil.cs
- AttributeEmitter.cs
- OrderByQueryOptionExpression.cs
- TemplateModeChangedEventArgs.cs
- ReaderWriterLock.cs
- TableItemStyle.cs
- ReadOnlyDictionary.cs
- PagedControl.cs
- MouseOverProperty.cs
- CoreSwitches.cs
- SmiContext.cs
- HttpsHostedTransportConfiguration.cs
- CodeTypeDelegate.cs
- Matrix.cs
- OAVariantLib.cs
- SpellerHighlightLayer.cs
- HtmlPageAdapter.cs
- SystemMulticastIPAddressInformation.cs
- InvalidCastException.cs
- PeerToPeerException.cs
- CacheMemory.cs
- BuilderPropertyEntry.cs
- SecurityTokenTypes.cs
- AuthorizationSection.cs
- ProgressBar.cs
- DPAPIProtectedConfigurationProvider.cs
- ChildTable.cs
- LayoutEditorPart.cs
- IPAddress.cs
- TableLayout.cs
- TreeNodeStyle.cs
- AlternationConverter.cs
- DistinctQueryOperator.cs
- OutputScope.cs
- InlineCollection.cs
- Util.cs
- PageThemeBuildProvider.cs
- Random.cs
- PenCursorManager.cs
- SemanticValue.cs
- EllipticalNodeOperations.cs
- CacheOutputQuery.cs
- ScriptingScriptResourceHandlerSection.cs
- BinaryFormatter.cs
- UpdateEventArgs.cs
- XmlWrappingReader.cs
- ProfileModule.cs
- ToolstripProfessionalRenderer.cs
- XhtmlConformanceSection.cs
- ContentTypeSettingClientMessageFormatter.cs
- FixedSOMFixedBlock.cs
- ClientUtils.cs
- SerializationInfo.cs
- IDispatchConstantAttribute.cs
- CalendarTable.cs
- InvalidFilterCriteriaException.cs
- FormatConvertedBitmap.cs
- _Events.cs
- XamlSerializerUtil.cs
- TeredoHelper.cs
- StdValidatorsAndConverters.cs
- WebBodyFormatMessageProperty.cs
- KeyValuePairs.cs
- Rotation3D.cs
- UrlPath.cs
- SqlStream.cs
- TypeConverterHelper.cs
- ActivationProxy.cs
- WebPartEditorApplyVerb.cs
- DesigntimeLicenseContext.cs
- MetadataItemCollectionFactory.cs
- FontDifferentiator.cs
- DesignerActionUIService.cs
- ObjectNotFoundException.cs
- Pair.cs
- AtomPub10CategoriesDocumentFormatter.cs
- Encoder.cs
- Axis.cs
- WindowsPrincipal.cs
- ObjectHelper.cs
- SmtpReplyReaderFactory.cs
- SiteMapNode.cs
- DataGrid.cs
- AuthenticationModuleElementCollection.cs
- EntityStoreSchemaFilterEntry.cs
- MessageDispatch.cs
- Pkcs9Attribute.cs