C# 6.0 feature.

This commit is contained in:
mika@stocksharp.com committed 2016-08-31 18:39:49 +03:00
1 parent ef196b88dc
commit f7305cbbb4
11 files changed
+17 -56

No files matched your search

@@ -1,4 +1,4 @@
#region S# License
#region S# License
/******************************************************************************************
NOTICE!!! This program and source code is owned and licensed by
StockSharp, LLC, www.stocksharp.com
@@ -103,10 +103,7 @@ namespace SampleAlfaCandles
base.OnClosing(e);
}
private Security SelectedSecurity
{
get { return Security.SelectedSecurity; }
}
private Security SelectedSecurity => Security.SelectedSecurity;
private void ShowChartClick(object sender, RoutedEventArgs e)
{
@@ -68,10 +68,7 @@ namespace SampleBarChart
window.Close();
}
public Security SelectedSecurity
{
get { return SecurityPicker.SelectedSecurity; }
}
public Security SelectedSecurity => SecurityPicker.SelectedSecurity;
private void SecurityPicker_OnSecuritySelected(Security security)
{
+1 -4
View File
@@ -55,10 +55,7 @@ namespace SampleCQG
private readonly LogManager _logManager = new LogManager();
private static string Username
{
get { return Properties.Settings.Default.Username; }
}
private static string Username => Properties.Settings.Default.Username;
public MainWindow()
{
@@ -57,15 +57,9 @@ namespace SampleETrade
//private Security[] _securities;
private static string ConsumerKey
{
get { return Properties.Settings.Default.ConsumerKey; }
}
private static string ConsumerKey => Properties.Settings.Default.ConsumerKey;
private static bool IsSandbox
{
get { return Properties.Settings.Default.Sandbox; }
}
private static bool IsSandbox => Properties.Settings.Default.Sandbox;
private readonly LogManager _logManager = new LogManager();
@@ -78,10 +78,7 @@ namespace SampleIQFeed
window.Close();
}
public Security SelectedSecurity
{
get { return SecurityPicker.SelectedSecurity; }
}
public Security SelectedSecurity => SecurityPicker.SelectedSecurity;
private void SecurityPicker_OnSecuritySelected(Security security)
{
@@ -1,4 +1,4 @@
#region S# License
#region S# License
/******************************************************************************************
NOTICE!!! This program and source code is owned and licensed by
StockSharp, LLC, www.stocksharp.com
@@ -48,10 +48,7 @@ namespace SampleAsyncTransactions
public static MainWindow Instance { get; private set; }
public Portfolio Portfolio
{
get { return Portfolios.SelectedPortfolio; }
}
public Portfolio Portfolio => Portfolios.SelectedPortfolio;
protected override void OnClosing(CancelEventArgs e)
{
@@ -1,4 +1,4 @@
#region S# License
#region S# License
/******************************************************************************************
NOTICE!!! This program and source code is owned and licensed by
StockSharp, LLC, www.stocksharp.com
@@ -158,10 +158,7 @@ namespace SampleQuikCandles
base.OnClosing(e);
}
private Security SelectedSecurity
{
get { return Security.SelectedSecurity; }
}
private Security SelectedSecurity => Security.SelectedSecurity;
private void OnSecuritySelected()
{
@@ -1,4 +1,4 @@
#region S# License
#region S# License
/******************************************************************************************
NOTICE!!! This program and source code is owned and licensed by
StockSharp, LLC, www.stocksharp.com
@@ -103,10 +103,7 @@ namespace SampleSmartCandles
base.OnClosing(e);
}
private Security SelectedSecurity
{
get { return Security.SelectedSecurity; }
}
private Security SelectedSecurity => Security.SelectedSecurity;
private void ShowChartClick(object sender, RoutedEventArgs e)
{
@@ -33,10 +33,7 @@ namespace SampleSterling
private readonly SynchronizedDictionary<Security, TradesWindow> _tradesWindows = new SynchronizedDictionary<Security, TradesWindow>();
private bool _initialized;
public Security SelectedSecurity
{
get { return SecurityPicker.SelectedSecurity; }
}
public Security SelectedSecurity => SecurityPicker.SelectedSecurity;
public SecuritiesWindow()
{
@@ -31,17 +31,11 @@ namespace SampleHistoryTestingParallel
private readonly StrategyParam<int> _longSmaPeriod;
public int LongSmaPeriod
{
get { return _longSmaPeriod.Value; }
}
public int LongSmaPeriod => _longSmaPeriod.Value;
private readonly StrategyParam<int> _shortSmaPeriod;
public int ShortSmaPeriod
{
get { return _shortSmaPeriod.Value; }
}
public int ShortSmaPeriod => _shortSmaPeriod.Value;
public SmaStrategy(ICandleManager candleManager, CandleSeries series, SimpleMovingAverage longSma, SimpleMovingAverage shortSma)
{
@@ -30,10 +30,7 @@ namespace SampleRealTimeEmulation
SecCode.Text = "AAPL";
}
public Security Criteria
{
get { return new Security { Type = SecType.SelectedType, Code = SecCode.Text }; }
}
public Security Criteria => new Security { Type = SecType.SelectedType, Code = SecCode.Text };
private void SecCode_TextChanged(object sender, TextChangedEventArgs e) { TryEnableOk(); }