Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ClientProxyGenerator.cs
- PathFigureCollectionConverter.cs
- LightweightCodeGenerator.cs
- TextSimpleMarkerProperties.cs
- ObjectCacheHost.cs
- StandardMenuStripVerb.cs
- FakeModelPropertyImpl.cs
- GenericIdentity.cs
- SQLMoney.cs
- RubberbandSelector.cs
- Avt.cs
- VirtualPathProvider.cs
- MessageHeaderAttribute.cs
- RpcCryptoContext.cs
- NavigatingCancelEventArgs.cs
- SmtpReplyReaderFactory.cs
- NumberFormatter.cs
- Peer.cs
- QilBinary.cs
- ManagementBaseObject.cs
- DataGridClipboardHelper.cs
- MailSettingsSection.cs
- WSHttpBinding.cs
- DynamicDataExtensions.cs
- ElementProxy.cs
- ComponentResourceManager.cs
- DoubleCollectionConverter.cs
- XPathDocumentIterator.cs
- TrustVersion.cs
- DirectoryNotFoundException.cs
- SchemaNotation.cs
- HandlerWithFactory.cs
- WebScriptMetadataInstanceContextProvider.cs
- MetadataItemCollectionFactory.cs
- Geometry3D.cs
- HMAC.cs
- Ipv6Element.cs
- SafeCryptContextHandle.cs
- TextOnlyOutput.cs
- DataGridViewButtonColumn.cs
- BindStream.cs
- TransformGroup.cs
- DataGridViewRowEventArgs.cs
- Part.cs
- ParameterToken.cs
- TypeListConverter.cs
- IsolatedStorageFileStream.cs
- AppDomainGrammarProxy.cs
- StringInfo.cs
- RtfFormatStack.cs
- HelloOperation11AsyncResult.cs
- SelectionRange.cs
- PassportAuthentication.cs
- CheckBoxBaseAdapter.cs
- JsonFormatReaderGenerator.cs
- FocusWithinProperty.cs
- EntityContainer.cs
- DataTableNewRowEvent.cs
- SchemaAttDef.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- SqlConnectionHelper.cs
- ActiveDesignSurfaceEvent.cs
- TextSelectionHelper.cs
- TextServicesManager.cs
- TimeoutValidationAttribute.cs
- HttpCachePolicyElement.cs
- RuleSettingsCollection.cs
- XamlPoint3DCollectionSerializer.cs
- RightsManagementEncryptedStream.cs
- ByteStack.cs
- OutgoingWebRequestContext.cs
- PropertyChangingEventArgs.cs
- RightsManagementInformation.cs
- TextTreeNode.cs
- ImageAnimator.cs
- TextContainerChangeEventArgs.cs
- XmlDataSource.cs
- EventSinkHelperWriter.cs
- NullableLongAverageAggregationOperator.cs
- HelloOperation11AsyncResult.cs
- ChannelServices.cs
- CompositionAdorner.cs
- ClassicBorderDecorator.cs
- DiscreteKeyFrames.cs
- Attribute.cs
- RowUpdatingEventArgs.cs
- InstanceData.cs
- EndpointReference.cs
- KoreanLunisolarCalendar.cs
- SystemException.cs
- SubpageParagraph.cs
- DataGridPagerStyle.cs
- DBProviderConfigurationHandler.cs
- StrongNameIdentityPermission.cs
- EdmScalarPropertyAttribute.cs
- TypeConverterAttribute.cs
- QueryLifecycle.cs
- SQLBinary.cs
- DataChangedEventManager.cs
- GPStream.cs