#region S# License
/******************************************************************************************
NOTICE!!! This program and source code is owned and licensed by
StockSharp, LLC, www.stocksharp.com
Viewing or use of this code requires your acceptance of the license
agreement found at https://github.com/StockSharp/StockSharp/blob/master/LICENSE
Removal of this comment is a violation of the license agreement.
Project: StockSharp.Localization.Localization
File: DisplayNameLocAttribute.cs
Created: 2015, 11, 11, 2:32 PM
Copyright 2010 by StockSharp, LLC
*******************************************************************************************/
#endregion S# License
namespace StockSharp.Localization
{
using System;
using System.ComponentModel;
using Ecng.Common;
///
/// Specifies the display name for a property, event, or public void method which takes no arguments.
///
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event)]
public class DisplayNameLocAttribute : DisplayNameAttribute
{
///
/// Initializes a new instance of the class using specified resource id for the display name.
///
/// String resource id.
public DisplayNameLocAttribute(string resourceId)
: base(LocalizedStrings.GetString(resourceId))
{
}
///
/// Initializes a new instance of the class using specified resource id for the display name.
///
/// String resource id.
/// Arg for formatted string.
public DisplayNameLocAttribute(string resourceId, string arg)
: base(LocalizedStrings.GetString(resourceId).Put(LocalizedStrings.GetString(arg)))
{
}
///
/// Initializes a new instance of the class using specified resource id for the display name.
///
/// String resource id.
/// Args for formatted string.
[CLSCompliant(false)]
public DisplayNameLocAttribute(string resourceId, params object[] args)
: base(LocalizedStrings.GetString(resourceId).Put(args))
{
}
}
}