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
- DataSpaceManager.cs
- HttpCapabilitiesBase.cs
- SafeSecurityHandles.cs
- CodeCatchClause.cs
- CodeGroup.cs
- FieldNameLookup.cs
- XamlFigureLengthSerializer.cs
- EditCommandColumn.cs
- PropertyManager.cs
- IImplicitResourceProvider.cs
- CompositeScriptReference.cs
- TileBrush.cs
- MaskedTextBox.cs
- GenericUI.cs
- CellQuery.cs
- ProfileService.cs
- Typeface.cs
- XmlElementAttributes.cs
- AttributeCollection.cs
- AxHost.cs
- BulletedListDesigner.cs
- ParenExpr.cs
- EllipseGeometry.cs
- DesignerValidatorAdapter.cs
- NotifyIcon.cs
- DbException.cs
- DataControlFieldsEditor.cs
- WebConfigurationHost.cs
- RenderContext.cs
- DiscoveryDocumentLinksPattern.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- MessageDirection.cs
- _TimerThread.cs
- SqlGenericUtil.cs
- SelectionWordBreaker.cs
- TextComposition.cs
- Privilege.cs
- LinearGradientBrush.cs
- CommandManager.cs
- DependencyObject.cs
- MessagingDescriptionAttribute.cs
- DesignerTextViewAdapter.cs
- SchemaComplexType.cs
- LocalizationComments.cs
- NetStream.cs
- PropertyNames.cs
- EDesignUtil.cs
- HostingEnvironmentException.cs
- StatusBarItem.cs
- IsolatedStorageFileStream.cs
- SynchronizationLockException.cs
- MD5HashHelper.cs
- FamilyTypeface.cs
- Help.cs
- GridViewCommandEventArgs.cs
- TreeNodeConverter.cs
- EmptyElement.cs
- NameNode.cs
- DataProtection.cs
- XmlConvert.cs
- GridViewRowPresenter.cs
- QuaternionAnimation.cs
- PackageFilter.cs
- EarlyBoundInfo.cs
- TypeUnloadedException.cs
- PeerNameRecordCollection.cs
- PersonalizationEntry.cs
- LogicalTreeHelper.cs
- TransformPatternIdentifiers.cs
- OdbcRowUpdatingEvent.cs
- _UncName.cs
- RegexGroup.cs
- CallbackValidatorAttribute.cs
- DispatchRuntime.cs
- RootBrowserWindowAutomationPeer.cs
- SelectionHighlightInfo.cs
- ProxyWebPart.cs
- _FtpDataStream.cs
- InternalsVisibleToAttribute.cs
- WebHttpElement.cs
- CompilerError.cs
- updateconfighost.cs
- TextBoxRenderer.cs
- StatusBar.cs
- TreeNodeCollection.cs
- SqlEnums.cs
- ItemsPresenter.cs
- CompositeDataBoundControl.cs
- DesignTimeData.cs
- CreateUserErrorEventArgs.cs
- TdsParserStateObject.cs
- SparseMemoryStream.cs
- WebScriptMetadataFormatter.cs
- DiscoveryClientDuplexChannel.cs
- CssStyleCollection.cs
- DbConnectionPoolOptions.cs
- CompilerGeneratedAttribute.cs
- contentDescriptor.cs
- SerialStream.cs
- MsmqIntegrationProcessProtocolHandler.cs