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
- CompletionBookmark.cs
- DataAdapter.cs
- Hashtable.cs
- InfocardExtendedInformationEntry.cs
- SrgsItemList.cs
- XmlILConstructAnalyzer.cs
- ExpandCollapsePattern.cs
- Sentence.cs
- Solver.cs
- InputLanguageProfileNotifySink.cs
- FlowPosition.cs
- SystemIcmpV6Statistics.cs
- ListViewSortEventArgs.cs
- TypeDependencyAttribute.cs
- XPathAxisIterator.cs
- DataGridHeaderBorder.cs
- AsymmetricAlgorithm.cs
- ReliableOutputSessionChannel.cs
- RegexReplacement.cs
- SettingsAttributeDictionary.cs
- ReadOnlyMetadataCollection.cs
- ObjectDataSourceChooseMethodsPanel.cs
- InternalReceiveMessage.cs
- CheckBox.cs
- LongAverageAggregationOperator.cs
- SimpleBitVector32.cs
- HttpListener.cs
- ICollection.cs
- ListViewAutomationPeer.cs
- WebPartTracker.cs
- InvalidOleVariantTypeException.cs
- EditorZone.cs
- RunClient.cs
- XmlNodeChangedEventArgs.cs
- UTF7Encoding.cs
- PartitionResolver.cs
- SafeHandle.cs
- SetterBaseCollection.cs
- TrackBar.cs
- RoleManagerModule.cs
- OleDbTransaction.cs
- MergeFilterQuery.cs
- XPathDocumentBuilder.cs
- ListViewCommandEventArgs.cs
- BatchStream.cs
- Classification.cs
- LinqToSqlWrapper.cs
- CheckBox.cs
- Image.cs
- DbDataRecord.cs
- IdnMapping.cs
- Publisher.cs
- DataGridViewCellParsingEventArgs.cs
- RightsManagementEncryptedStream.cs
- Crypto.cs
- AlternateViewCollection.cs
- EditorPartCollection.cs
- BrowserInteropHelper.cs
- BamlRecords.cs
- ThousandthOfEmRealDoubles.cs
- OracleMonthSpan.cs
- NullRuntimeConfig.cs
- AssemblyBuilderData.cs
- DataMemberListEditor.cs
- _TransmitFileOverlappedAsyncResult.cs
- TimeSpanOrInfiniteValidator.cs
- SmiConnection.cs
- PropertySourceInfo.cs
- FieldReference.cs
- BuildManagerHost.cs
- HttpWriter.cs
- RecordBuilder.cs
- ConfigurationCollectionAttribute.cs
- SafePipeHandle.cs
- AttachmentService.cs
- ImmComposition.cs
- XmlMembersMapping.cs
- EntitySetDataBindingList.cs
- StreamResourceInfo.cs
- ProfileModule.cs
- SortableBindingList.cs
- Parameter.cs
- SafeHandles.cs
- DesignerActionList.cs
- LowerCaseStringConverter.cs
- DrawingVisualDrawingContext.cs
- MatrixAnimationUsingKeyFrames.cs
- KeyNotFoundException.cs
- InternalControlCollection.cs
- ResourceAttributes.cs
- SQLSingle.cs
- UserPersonalizationStateInfo.cs
- NamespaceExpr.cs
- COM2EnumConverter.cs
- StringPropertyBuilder.cs
- BaseResourcesBuildProvider.cs
- WebPageTraceListener.cs
- ClientEventManager.cs
- XPathEmptyIterator.cs
- WebPartZoneAutoFormat.cs