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
- VideoDrawing.cs
- EdmValidator.cs
- ToolStripSeparatorRenderEventArgs.cs
- DataSetUtil.cs
- TextEditorTables.cs
- Application.cs
- XmlIlTypeHelper.cs
- UnsafeNativeMethods.cs
- FileDialog_Vista_Interop.cs
- XmlEntity.cs
- StrokeNodeOperations.cs
- HMACSHA256.cs
- EntityPropertyMappingAttribute.cs
- StringConcat.cs
- DisplayInformation.cs
- TerminateDesigner.cs
- ApplicationSecurityManager.cs
- IndependentAnimationStorage.cs
- DurableInstanceContextProvider.cs
- ContentTextAutomationPeer.cs
- InvariantComparer.cs
- XamlStream.cs
- DataControlLinkButton.cs
- EventWaitHandleSecurity.cs
- ScriptControlDescriptor.cs
- SqlConnectionManager.cs
- Vector3D.cs
- CapabilitiesUse.cs
- ValueTypeFixupInfo.cs
- loginstatus.cs
- StrokeNodeData.cs
- DecoderNLS.cs
- RectangleHotSpot.cs
- WebHeaderCollection.cs
- ByteAnimationBase.cs
- ImageField.cs
- ArraySet.cs
- TextAdaptor.cs
- DeflateInput.cs
- PropertyValueUIItem.cs
- Schema.cs
- SystemUnicastIPAddressInformation.cs
- ListViewDataItem.cs
- XNameTypeConverter.cs
- ProgressBar.cs
- SortedList.cs
- OptimizerPatterns.cs
- FontFamilyValueSerializer.cs
- ForAllOperator.cs
- ControlBuilderAttribute.cs
- SecurityAlgorithmSuite.cs
- SafeNativeMethods.cs
- ObjectDataSourceSelectingEventArgs.cs
- AuthStoreRoleProvider.cs
- AmbiguousMatchException.cs
- DrawingCollection.cs
- OleDbRowUpdatedEvent.cs
- ContractAdapter.cs
- CreateBookmarkScope.cs
- NavigationPropertyEmitter.cs
- FixedSOMPageElement.cs
- BooleanExpr.cs
- InkCanvas.cs
- SHA384.cs
- BitmapVisualManager.cs
- DbDataSourceEnumerator.cs
- PropertyGeneratedEventArgs.cs
- SafePointer.cs
- MembershipUser.cs
- VisualStyleRenderer.cs
- TextStore.cs
- RenderData.cs
- Int64Animation.cs
- BinHexDecoder.cs
- FixedPageStructure.cs
- SegmentTree.cs
- AttributeUsageAttribute.cs
- SecurityPolicySection.cs
- ScriptingSectionGroup.cs
- LogicalExpr.cs
- BamlLocalizableResource.cs
- UpdateCompiler.cs
- Single.cs
- SchemaReference.cs
- ToolStripContainer.cs
- WebReferencesBuildProvider.cs
- SmtpDigestAuthenticationModule.cs
- DataGridViewCellCancelEventArgs.cs
- XmlLanguage.cs
- HeaderedContentControl.cs
- ImportCatalogPart.cs
- SessionState.cs
- QilTernary.cs
- Camera.cs
- FormatConvertedBitmap.cs
- MiniCustomAttributeInfo.cs
- GridViewCancelEditEventArgs.cs
- DllNotFoundException.cs
- XmlCharCheckingReader.cs
- WebControlParameterProxy.cs