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;
///
/// 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
- PropertyChangeTracker.cs
- UriSectionReader.cs
- Queue.cs
- EntityUtil.cs
- AsyncResult.cs
- ClientTargetSection.cs
- TextEditorSpelling.cs
- DataGridItemCollection.cs
- DrawingBrush.cs
- FileChangesMonitor.cs
- XmlSchemaGroupRef.cs
- CqlBlock.cs
- CompilationSection.cs
- PathHelper.cs
- ImageMap.cs
- ProviderCommandInfoUtils.cs
- EventEntry.cs
- ResourceContainer.cs
- UiaCoreTypesApi.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- XmlChildNodes.cs
- RecommendedAsConfigurableAttribute.cs
- ScriptingRoleServiceSection.cs
- PagerSettings.cs
- WhitespaceRule.cs
- PersonalizationDictionary.cs
- ImpersonateTokenRef.cs
- WebPartDisplayModeEventArgs.cs
- HashMembershipCondition.cs
- XamlDesignerSerializationManager.cs
- PaperSize.cs
- Root.cs
- ValueUnavailableException.cs
- SqlGatherConsumedAliases.cs
- XmlSchemaAnyAttribute.cs
- TextDecorationLocationValidation.cs
- FileLogRecordStream.cs
- SchemaImporterExtension.cs
- TransformPattern.cs
- SiteMapDataSourceDesigner.cs
- XmlSecureResolver.cs
- Int32.cs
- SecurityContextCookieSerializer.cs
- SimpleWebHandlerParser.cs
- ThrowOnMultipleAssignment.cs
- ProcessingInstructionAction.cs
- XmlNamespaceDeclarationsAttribute.cs
- x509utils.cs
- ThemeableAttribute.cs
- DropSourceBehavior.cs
- ScrollChrome.cs
- DesignerVerbCollection.cs
- NativeDirectoryServicesQueryAPIs.cs
- DurationConverter.cs
- SafeNativeMethods.cs
- DbConnectionHelper.cs
- MaskedTextBoxTextEditorDropDown.cs
- ToolStripDropDownClosingEventArgs.cs
- embossbitmapeffect.cs
- MetadataPropertyvalue.cs
- DefaultProxySection.cs
- XPathDocumentBuilder.cs
- UniqueIdentifierService.cs
- DesignerActionUIStateChangeEventArgs.cs
- IdentityModelDictionary.cs
- ConsumerConnectionPoint.cs
- SHA256Cng.cs
- ColorInterpolationModeValidation.cs
- ConstantCheck.cs
- C14NUtil.cs
- WmlMobileTextWriter.cs
- SqlBinder.cs
- DataViewManager.cs
- ClientRuntimeConfig.cs
- AssemblyBuilder.cs
- MoveSizeWinEventHandler.cs
- SafeCertificateContext.cs
- XmlHierarchyData.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- DataGridViewColumnEventArgs.cs
- ServiceThrottle.cs
- PropertyRecord.cs
- InfoCard.cs
- ColorBuilder.cs
- _AcceptOverlappedAsyncResult.cs
- Substitution.cs
- FileSecurity.cs
- GeneralTransform3DCollection.cs
- BitmapScalingModeValidation.cs
- LinqDataSourceHelper.cs
- DataControlExtensions.cs
- Style.cs
- EmptyStringExpandableObjectConverter.cs
- EllipseGeometry.cs
- CodeNamespaceCollection.cs
- DataSet.cs
- SimpleRecyclingCache.cs
- HtmlGenericControl.cs
- ActivityExecutionContextCollection.cs
- XmlBinaryWriter.cs