Skip to content
Permalink
Browse files

ConnectorWindow. Allow change connector's name.

  • Loading branch information...
mikasoukhov committed May 17, 2019
1 parent dd6c795 commit e00ccb42497fd3ee8085e0d755404d55480178e3
/// Zero
/// </summary>
public static string Zero => GetString(ZeroKey);

/// <summary>
/// Connector
/// </summary>
public const string ConnectorKey = nameof(Connector);

/// <summary>
/// Connector
/// </summary>
public static string Connector => GetString(ConnectorKey);
}
}
@@ -78,13 +78,13 @@ P:StockSharp.Logging.ILogSource.IsRoot/summary;DocStr3958
E:StockSharp.Logging.ILogSource.Log/summary;DocStr3959
T:StockSharp.Logging.BaseLogSource/summary;DocStr1579
M:StockSharp.Logging.BaseLogSource.#ctor/summary;DocStr93
P:StockSharp.Logging.BaseLogSource.Id/summary;DocStr1678
P:StockSharp.Logging.BaseLogSource.Name/summary;Str7
P:StockSharp.Logging.BaseLogSource.Parent/summary;DocStr3963
P:StockSharp.Logging.BaseLogSource.LogLevel/summary;DocStr1679
P:StockSharp.Logging.BaseLogSource.CurrentTime/summary;DocStr910
P:StockSharp.Logging.BaseLogSource.IsRoot/summary;DocStr3958
E:StockSharp.Logging.BaseLogSource.Log/summary;DocStr3959
P:StockSharp.Logging.BaseLogSource.Id/inheritdoc;DocStr8459
P:StockSharp.Logging.BaseLogSource.Name/inheritdoc;DocStr8459
P:StockSharp.Logging.BaseLogSource.Parent/inheritdoc;DocStr8459
P:StockSharp.Logging.BaseLogSource.LogLevel/inheritdoc;DocStr8459
P:StockSharp.Logging.BaseLogSource.CurrentTime/inheritdoc;DocStr8459
P:StockSharp.Logging.BaseLogSource.IsRoot/inheritdoc;DocStr8459
E:StockSharp.Logging.BaseLogSource.Log/inheritdoc;DocStr8459
M:StockSharp.Logging.BaseLogSource.RaiseLog(StockSharp.Logging.LogMessage)/summary;DocStr466
M:StockSharp.Logging.BaseLogSource.RaiseLog(StockSharp.Logging.LogMessage)/param/message;DocStr1653
M:StockSharp.Logging.BaseLogSource.ToString/summary;DocStr49
@@ -38,7 +38,7 @@ public interface ILogSource : IDisposable
/// <summary>
/// The source name.
/// </summary>
string Name { get; }
string Name { get; set; }

/// <summary>
/// Parental logs source.
@@ -79,17 +79,13 @@ protected BaseLogSource()
_name = GetType().GetDisplayName();
}

/// <summary>
/// The unique identifier of the source.
/// </summary>
/// <inheritdoc />
[Browsable(false)]
public virtual Guid Id { get; set; } = Guid.NewGuid();

private string _name;

/// <summary>
/// Source name (to distinguish in log files).
/// </summary>
/// <inheritdoc />
[ReadOnly(true)]
[Display(
ResourceType = typeof(LocalizedStrings),
@@ -111,9 +107,7 @@ public virtual string Name

private ILogSource _parent;

/// <summary>
/// Parent.
/// </summary>
/// <inheritdoc />
[Browsable(false)]
public ILogSource Parent
{
@@ -133,9 +127,7 @@ public ILogSource Parent
}
}

/// <summary>
/// The logging level. The default is set to <see cref="LogLevels.Inherit"/>.
/// </summary>
/// <inheritdoc />
[Display(
ResourceType = typeof(LocalizedStrings),
Name = LocalizedStrings.Str9Key,
@@ -144,23 +136,17 @@ public ILogSource Parent
Order = 1)]
public virtual LogLevels LogLevel { get; set; } = LogLevels.Inherit;

/// <summary>
/// Current time, which will be passed to the <see cref="LogMessage.Time"/>.
/// </summary>
/// <inheritdoc />
[Browsable(false)]
public virtual DateTimeOffset CurrentTime => TimeHelper.NowWithOffset;

/// <summary>
/// Whether the source is the root (even if <see cref="ILogSource.Parent"/> is not equal to <see langword="null" />).
/// </summary>
/// <inheritdoc />
[Browsable(false)]
public bool IsRoot { get; set; }

private Action<LogMessage> _log;

/// <summary>
/// New debug message event.
/// </summary>
/// <inheritdoc />
public event Action<LogMessage> Log
{
add => _log += value;
@@ -202,6 +188,7 @@ public override string ToString()
public virtual void Load(SettingsStorage storage)
{
LogLevel = storage.GetValue(nameof(LogLevel), LogLevels.Inherit);
Name = storage.GetValue(nameof(Name), Name);
}

/// <summary>
@@ -211,6 +198,7 @@ public virtual void Load(SettingsStorage storage)
public virtual void Save(SettingsStorage storage)
{
storage.SetValue(nameof(LogLevel), LogLevel.To<string>());
storage.SetValue(nameof(Name), Name);
}
}
}
BIN +1.5 KB (100%) References/StockSharp.Xaml.dll
Binary file not shown.
@@ -97,6 +97,7 @@ StockSharp API Change log
* (feature) FieldMapping. ZeroAsNull added.
* (feature) CandleMessageGrid added.
* (feature) FIX connector. LMAX dialect added.
* (feature) ConnectorWindow. Allow change connector's name.

## v4.4.16:
* (feature) Alerts. Message made optional for sound based events.

0 comments on commit e00ccb4

Please sign in to comment.
You can’t perform that action at this time.