diff --git a/Samples/AlfaDirect/SampleAlfaCandles/MainWindow.xaml.cs b/Samples/AlfaDirect/SampleAlfaCandles/MainWindow.xaml.cs index 96747a1b6..8005b9c6d 100644 --- a/Samples/AlfaDirect/SampleAlfaCandles/MainWindow.xaml.cs +++ b/Samples/AlfaDirect/SampleAlfaCandles/MainWindow.xaml.cs @@ -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) { diff --git a/Samples/BarChart/SampleBarChart/SecuritiesWindow.xaml.cs b/Samples/BarChart/SampleBarChart/SecuritiesWindow.xaml.cs index 05d4dc202..926345409 100644 --- a/Samples/BarChart/SampleBarChart/SecuritiesWindow.xaml.cs +++ b/Samples/BarChart/SampleBarChart/SecuritiesWindow.xaml.cs @@ -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) { diff --git a/Samples/CQG/SampleCQG/MainWindow.xaml.cs b/Samples/CQG/SampleCQG/MainWindow.xaml.cs index c99250837..a75d73076 100644 --- a/Samples/CQG/SampleCQG/MainWindow.xaml.cs +++ b/Samples/CQG/SampleCQG/MainWindow.xaml.cs @@ -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() { diff --git a/Samples/ETrade/SampleETrade/MainWindow.xaml.cs b/Samples/ETrade/SampleETrade/MainWindow.xaml.cs index dff4e5f8a..74c1f95f6 100644 --- a/Samples/ETrade/SampleETrade/MainWindow.xaml.cs +++ b/Samples/ETrade/SampleETrade/MainWindow.xaml.cs @@ -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(); diff --git a/Samples/IQFeed/SampleIQFeed/SecuritiesWindow.xaml.cs b/Samples/IQFeed/SampleIQFeed/SecuritiesWindow.xaml.cs index aafddbefb..2d9cc7dce 100644 --- a/Samples/IQFeed/SampleIQFeed/SecuritiesWindow.xaml.cs +++ b/Samples/IQFeed/SampleIQFeed/SecuritiesWindow.xaml.cs @@ -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) { diff --git a/Samples/Quik/DDE/SampleAsyncTransactions/MainWindow.xaml.cs b/Samples/Quik/DDE/SampleAsyncTransactions/MainWindow.xaml.cs index f249359f1..06076f221 100644 --- a/Samples/Quik/DDE/SampleAsyncTransactions/MainWindow.xaml.cs +++ b/Samples/Quik/DDE/SampleAsyncTransactions/MainWindow.xaml.cs @@ -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) { diff --git a/Samples/Quik/SampleQuikCandles/MainWindow.xaml.cs b/Samples/Quik/SampleQuikCandles/MainWindow.xaml.cs index ae023970b..f63a00bb9 100644 --- a/Samples/Quik/SampleQuikCandles/MainWindow.xaml.cs +++ b/Samples/Quik/SampleQuikCandles/MainWindow.xaml.cs @@ -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() { diff --git a/Samples/SmartCom/SampleSmartCandles/MainWindow.xaml.cs b/Samples/SmartCom/SampleSmartCandles/MainWindow.xaml.cs index 938fa3fef..eeca1e1e4 100644 --- a/Samples/SmartCom/SampleSmartCandles/MainWindow.xaml.cs +++ b/Samples/SmartCom/SampleSmartCandles/MainWindow.xaml.cs @@ -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) { diff --git a/Samples/Sterling/SampleSterling/SecuritiesWindow.xaml.cs b/Samples/Sterling/SampleSterling/SecuritiesWindow.xaml.cs index d06d29858..7265ea061 100644 --- a/Samples/Sterling/SampleSterling/SecuritiesWindow.xaml.cs +++ b/Samples/Sterling/SampleSterling/SecuritiesWindow.xaml.cs @@ -33,10 +33,7 @@ namespace SampleSterling private readonly SynchronizedDictionary _tradesWindows = new SynchronizedDictionary(); private bool _initialized; - public Security SelectedSecurity - { - get { return SecurityPicker.SelectedSecurity; } - } + public Security SelectedSecurity => SecurityPicker.SelectedSecurity; public SecuritiesWindow() { diff --git a/Samples/Testing/SampleHistoryTestingParallel/SmaStrategy.cs b/Samples/Testing/SampleHistoryTestingParallel/SmaStrategy.cs index 98ef9b594..89f616b62 100644 --- a/Samples/Testing/SampleHistoryTestingParallel/SmaStrategy.cs +++ b/Samples/Testing/SampleHistoryTestingParallel/SmaStrategy.cs @@ -31,17 +31,11 @@ namespace SampleHistoryTestingParallel private readonly StrategyParam _longSmaPeriod; - public int LongSmaPeriod - { - get { return _longSmaPeriod.Value; } - } + public int LongSmaPeriod => _longSmaPeriod.Value; private readonly StrategyParam _shortSmaPeriod; - public int ShortSmaPeriod - { - get { return _shortSmaPeriod.Value; } - } + public int ShortSmaPeriod => _shortSmaPeriod.Value; public SmaStrategy(ICandleManager candleManager, CandleSeries series, SimpleMovingAverage longSma, SimpleMovingAverage shortSma) { diff --git a/Samples/Testing/SampleRealTimeEmulation/FindSecurityWindow.xaml.cs b/Samples/Testing/SampleRealTimeEmulation/FindSecurityWindow.xaml.cs index 6892b7ccc..25a5e8746 100644 --- a/Samples/Testing/SampleRealTimeEmulation/FindSecurityWindow.xaml.cs +++ b/Samples/Testing/SampleRealTimeEmulation/FindSecurityWindow.xaml.cs @@ -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(); }