# HG changeset patch
# User adminsh@apollo
# Date 1332262409 0
# Node ID 399398841fd06e46f58aad4ca05d00440b842821
# Parent a7a4cde3999973a2c2cc10a856a37b28bbd9a6d1
Working version for Stocks (including loosely coupled components
diff -r a7a4cde39999 -r 399398841fd0 .hgignore
--- a/.hgignore Tue Mar 20 15:07:49 2012 +0000
+++ b/.hgignore Tue Mar 20 16:53:29 2012 +0000
@@ -4,3 +4,4 @@
*.suo
*.csproj.user
*/obj/*
+*/_ReSharper*
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/MetroWpf.sln
--- a/MetroWpf/MetroWpf.sln Tue Mar 20 15:07:49 2012 +0000
+++ b/MetroWpf/MetroWpf.sln Tue Mar 20 16:53:29 2012 +0000
@@ -13,6 +13,8 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stocks.Common", "Stocks.Common\Stocks.Common.csproj", "{847365D2-E27B-44C3-8DF4-B749D9FA65D7}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stocks.UI", "Stocks.UI\Stocks.UI.csproj", "{BF20711D-4863-4FD3-9B6C-42D4E677D85C}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -83,6 +85,16 @@
{847365D2-E27B-44C3-8DF4-B749D9FA65D7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{847365D2-E27B-44C3-8DF4-B749D9FA65D7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{847365D2-E27B-44C3-8DF4-B749D9FA65D7}.Release|x86.ActiveCfg = Release|Any CPU
+ {BF20711D-4863-4FD3-9B6C-42D4E677D85C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BF20711D-4863-4FD3-9B6C-42D4E677D85C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BF20711D-4863-4FD3-9B6C-42D4E677D85C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {BF20711D-4863-4FD3-9B6C-42D4E677D85C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {BF20711D-4863-4FD3-9B6C-42D4E677D85C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BF20711D-4863-4FD3-9B6C-42D4E677D85C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BF20711D-4863-4FD3-9B6C-42D4E677D85C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BF20711D-4863-4FD3-9B6C-42D4E677D85C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {BF20711D-4863-4FD3-9B6C-42D4E677D85C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {BF20711D-4863-4FD3-9B6C-42D4E677D85C}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/MetroWpf/IoCModule.cs
--- a/MetroWpf/MetroWpf/IoCModule.cs Tue Mar 20 15:07:49 2012 +0000
+++ b/MetroWpf/MetroWpf/IoCModule.cs Tue Mar 20 16:53:29 2012 +0000
@@ -7,11 +7,11 @@
using MetroWpf.Presentation.Menu;
using MetroWpf.Presentation.Settings;
using MetroWpf.Presentation.Shell;
-using MetroWpf.Presentation.Stocks;
using MetroWpf.Presentation.UserProfile;
using Ninject.Modules;
using Stocks.Common;
using Stocks.Service;
+using Stocks.UI.ViewModels;
namespace MetroWpf
{
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/MetroWpf/Locator.cs
--- a/MetroWpf/MetroWpf/Locator.cs Tue Mar 20 15:07:49 2012 +0000
+++ b/MetroWpf/MetroWpf/Locator.cs Tue Mar 20 16:53:29 2012 +0000
@@ -4,11 +4,11 @@
using MetroWpf.Presentation.Shell;
using MetroWpf.Presentation.Settings;
using MetroWpf.Presentation.Login;
-using MetroWpf.Presentation.Stocks;
using MetroWpf.Presentation.UserProfile;
using MetroWpf.Presentation.About;
using MetroWpf.Presentation.Menu;
using Microsoft.Practices.ServiceLocation;
+using Stocks.UI.ViewModels;
namespace MetroWpf
{
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/MetroWpf/MetroWpf.csproj
--- a/MetroWpf/MetroWpf/MetroWpf.csproj Tue Mar 20 15:07:49 2012 +0000
+++ b/MetroWpf/MetroWpf/MetroWpf.csproj Tue Mar 20 16:53:29 2012 +0000
@@ -96,11 +96,6 @@
-
-
- StocksView.xaml
-
-
@@ -185,10 +180,6 @@
MSBuild:Compile
Designer
-
- MSBuild:Compile
- Designer
-
Designer
MSBuild:Compile
@@ -223,18 +214,10 @@
{47F54122-5381-48D8-ACF7-72BBE0353511}
Stocks.Service
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {BF20711D-4863-4FD3-9B6C-42D4E677D85C}
+ Stocks.UI
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/MetroWpf/Presentation/Stocks/StocksView.xaml.cs
--- a/MetroWpf/MetroWpf/Presentation/Stocks/StocksView.xaml.cs Tue Mar 20 15:07:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace MetroWpf.Presentation.Stocks
-{
- ///
- /// Interaction logic for StocksView.xaml
- ///
- public partial class StocksView : UserControl
- {
- public StocksView()
- {
- InitializeComponent();
- }
- }
-}
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/MetroWpf/Presentation/Stocks/StocksViewModel.cs
--- a/MetroWpf/MetroWpf/Presentation/Stocks/StocksViewModel.cs Tue Mar 20 15:07:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Linq;
-using System.Reactive;
-using System.Reactive.Linq;
-using System.Windows.Input;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using Stocks.Common;
-using Stocks.Common.Events;
-
-namespace MetroWpf.Presentation.Stocks
-{
- public class StocksViewModel : ViewModelBase
- {
- private readonly IStocksService _service;
-
- public BindingList DisplayStockPrices { get; set; }
- public ICommand ServiceCommand { get; set; }
- public ICommand SubscriptionCommand { get; set; }
-
- public StocksViewModel(IStocksService service)
- {
- _service = service;
- GetLatestPrices();
-
- SubscriptionCommand = new RelayCommand(SubscriptionCommandExecute);
- ServiceCommand = new RelayCommand(ServiceRunningCommandExecute);
-
- var priceUpdates = Observable.FromEventPattern(
- _service,
- "PriceChanged");
-
- priceUpdates.Where(e => Subscribed)
- //.Throttle(TimeSpan.FromSeconds(1))
- .Subscribe(PriceChanged);
- }
-
- public void PriceChanged(EventPattern e)
- {
- var displayRate = DisplayStockPrices.First(
- rate => rate.Symbol == e.EventArgs.Price.Symbol);
-
- if (displayRate != null)
- displayRate.Update(e.EventArgs.Price);
- }
-
-
- private void GetLatestPrices()
- {
- DisplayStockPrices = new BindingList();
- var currentRates = _service.GetFullCurrentPrices();
- foreach (var latestRate in currentRates)
- {
- var displayRate = DisplayStockPrice.Create(latestRate);
- DisplayStockPrices.Add(displayRate);
- }
- }
-
- private const string SubscribedPropertyName = "Subscribed";
- private bool _subscribed = false;
-
- public bool Subscribed
- {
- get { return _subscribed; }
- set
- {
- if (_subscribed == value) return;
- _subscribed = value;
- RaisePropertyChanged(SubscribedPropertyName);
- }
- }
-
- private const string ServiceRunningPropertyName = "ServiceRunning";
- private bool _serviceRunning;
-
- public bool ServiceRunning
- {
- get { return _serviceRunning; }
- set
- {
- if (_serviceRunning == value) return;
- _serviceRunning = value;
- RaisePropertyChanged(ServiceRunningPropertyName);
- }
- }
-
- private void ServiceRunningCommandExecute()
- {
- if (_service.IsRunning)
- {
- _service.Stop();
- ServiceRunning = false;
- }
- else
- {
- _service.Start();
- ServiceRunning = true;
- }
- }
-
- private void SubscriptionCommandExecute()
- {
- //toggle subscribed
- Subscribed = !Subscribed;
- }
- }
-}
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.Service/StocksService.cs
--- a/MetroWpf/Stocks.Service/StocksService.cs Tue Mar 20 15:07:49 2012 +0000
+++ b/MetroWpf/Stocks.Service/StocksService.cs Tue Mar 20 16:53:29 2012 +0000
@@ -130,7 +130,7 @@
continue;
}
- if (!localPrice.Equals(webPrice))
+ if (localPrice.CurrentPrice != webPrice.CurrentPrice)
UpdateLocalPrice(webPrice, localPrice);
}
}
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/App.xaml
--- a/MetroWpf/Stocks.UI/App.xaml Tue Mar 20 15:07:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/App.xaml.cs
--- a/MetroWpf/Stocks.UI/App.xaml.cs Tue Mar 20 15:07:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Linq;
-using System.Windows;
-
-namespace Stocks.UI
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-}
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Converters/DeltaToIconConverter.cs
--- a/MetroWpf/Stocks.UI/Converters/DeltaToIconConverter.cs Tue Mar 20 15:07:49 2012 +0000
+++ b/MetroWpf/Stocks.UI/Converters/DeltaToIconConverter.cs Tue Mar 20 16:53:29 2012 +0000
@@ -17,15 +17,15 @@
try
{
- delta = (decimal) value;
- {
- if (delta > 0)
- file = "UP";
- else if (delta < 0)
- file = "DOWN";
- else
- file = "LEVEL";
- }
+ delta = (decimal) value;
+ {
+ if (delta > 0)
+ file = "UP";
+ else if (delta < 0)
+ file = "DOWN";
+ else
+ file = "LEVEL";
+ }
}
finally
{
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/DisplayStockPrice.cs
--- a/MetroWpf/Stocks.UI/DisplayStockPrice.cs Tue Mar 20 15:07:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-using GalaSoft.MvvmLight;
-using Stocks.Common.Models;
-
-namespace Stocks.UI
-{
- public class DisplayStockPrice : ObservableObject
- {
- public static DisplayStockPrice Create(Price price)
- {
- return new DisplayStockPrice()
- {
- Symbol = price.Symbol,
- CurrentPrice = price.CurrentPrice,
- PreviousPrice = price.PreviousPrice
- };
- }
-
- public void Update(Price price)
- {
- Symbol = price.Symbol;
- CurrentPrice = price.CurrentPrice;
- PreviousPrice = price.PreviousPrice;
- }
-
- public const string SymbolPropertyName = "Symbol";
- private string _symbol;
- public string Symbol
- {
- get { return _symbol; }
- private set
- {
- if (_symbol == value) return;
- _symbol = value;
- RaisePropertyChanged(SymbolPropertyName);
- }
- }
-
- public const string CompanyNamePropertyName = "CompanyName";
- private string _companyName;
- public string CompanyName
- {
- get { return _companyName; }
- private set
- {
- if (_companyName == value) return;
- _companyName = value;
- RaisePropertyChanged(CompanyNamePropertyName);
- }
- }
-
- public const string CurrentPricePropertyName = "CurrentPrice";
- private decimal _currentPrice = 0;
- public decimal CurrentPrice
- {
- get { return _currentPrice; }
- private set
- {
- if (_currentPrice == value) return;
- _currentPrice = value;
- RaisePropertyChanged(CurrentPricePropertyName);
- }
- }
-
- public const string PreviousPricePropertyName = "PreviousPrice";
- private decimal _previousPrice = 0;
- public decimal PreviousPrice
- {
- get { return _previousPrice; }
- private set
- {
- if (_previousPrice == value) return;
- _previousPrice = value;
- RaisePropertyChanged(PreviousPricePropertyName);
- }
- }
-
- public const string DeltaPropertyName = "Delta";
- private decimal _delta = 0;
- public decimal Delta
- {
- get { return _delta; }
- private set
- {
- if (_delta == value) return;
- _delta = value;
- RaisePropertyChanged(DeltaPropertyName);
- }
- }
- }
-}
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Images/DOWN.png
Binary file MetroWpf/Stocks.UI/Images/DOWN.png has changed
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Images/LEVEL.png
Binary file MetroWpf/Stocks.UI/Images/LEVEL.png has changed
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Images/UNK.png
Binary file MetroWpf/Stocks.UI/Images/UNK.png has changed
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Images/UP.png
Binary file MetroWpf/Stocks.UI/Images/UP.png has changed
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Locator.cs
--- a/MetroWpf/Stocks.UI/Locator.cs Tue Mar 20 15:07:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-using GalaSoft.MvvmLight.Ioc;
-
-namespace Stocks.UI
-{
- public class Locator
- {
- public StocksViewModel StocksViewModel
- {
- get { return SimpleIoc.Default.GetInstance(); }
- }
- }
-}
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Models/DisplayStockPrice.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/MetroWpf/Stocks.UI/Models/DisplayStockPrice.cs Tue Mar 20 16:53:29 2012 +0000
@@ -0,0 +1,108 @@
+using System;
+using GalaSoft.MvvmLight;
+using Stocks.Common.Models;
+
+namespace Stocks.UI.Models
+{
+ public class DisplayStockPrice : ObservableObject
+ {
+ public static DisplayStockPrice Create(Price price)
+ {
+ return new DisplayStockPrice()
+ {
+ CompanyName = price.CompanyName,
+ Symbol = price.Symbol,
+ CurrentPrice = price.CurrentPrice,
+ PreviousPrice = price.PreviousPrice,
+ Timestamp = DateTime.Now
+ };
+ }
+
+ public void Update(Price price)
+ {
+ Symbol = price.Symbol;
+ CurrentPrice = price.CurrentPrice;
+ PreviousPrice = price.PreviousPrice;
+ Delta = price.CurrentPrice - price.PreviousPrice;
+ Timestamp = DateTime.Now;
+ }
+
+ public const string SymbolPropertyName = "Symbol";
+ private string _symbol;
+ public string Symbol
+ {
+ get { return _symbol; }
+ private set
+ {
+ if (_symbol == value) return;
+ _symbol = value;
+ RaisePropertyChanged(SymbolPropertyName);
+ }
+ }
+
+ public const string CompanyNamePropertyName = "CompanyName";
+ private string _companyName;
+ public string CompanyName
+ {
+ get { return _companyName; }
+ private set
+ {
+ if (_companyName == value) return;
+ _companyName = value;
+ RaisePropertyChanged(CompanyNamePropertyName);
+ }
+ }
+
+ public const string CurrentPricePropertyName = "CurrentPrice";
+ private decimal _currentPrice = 0;
+ public decimal CurrentPrice
+ {
+ get { return _currentPrice; }
+ private set
+ {
+ if (_currentPrice == value) return;
+ _currentPrice = value;
+ RaisePropertyChanged(CurrentPricePropertyName);
+ }
+ }
+
+ public const string PreviousPricePropertyName = "PreviousPrice";
+ private decimal _previousPrice = 0;
+ public decimal PreviousPrice
+ {
+ get { return _previousPrice; }
+ private set
+ {
+ if (_previousPrice == value) return;
+ _previousPrice = value;
+ RaisePropertyChanged(PreviousPricePropertyName);
+ }
+ }
+
+ public const string DeltaPropertyName = "Delta";
+ private decimal _delta = 0;
+ public decimal Delta
+ {
+ get { return _delta; }
+ private set
+ {
+ if (_delta == value) return;
+ _delta = value;
+ RaisePropertyChanged(DeltaPropertyName);
+ }
+ }
+
+ public const string TimestampPropertyName = "Timestamp";
+ private DateTime _timestamp = DateTime.MinValue;
+ public DateTime Timestamp
+ {
+ get { return _timestamp; }
+ private set
+ {
+ if (_timestamp == value) return;
+ _timestamp = value;
+ RaisePropertyChanged(TimestampPropertyName);
+ }
+ }
+ }
+}
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Properties/AssemblyInfo.cs
--- a/MetroWpf/Stocks.UI/Properties/AssemblyInfo.cs Tue Mar 20 15:07:49 2012 +0000
+++ b/MetroWpf/Stocks.UI/Properties/AssemblyInfo.cs Tue Mar 20 16:53:29 2012 +0000
@@ -1,8 +1,6 @@
using System.Reflection;
-using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
@@ -21,25 +19,8 @@
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
-//In order to begin building localizable applications, set
-//CultureYouAreCodingWith in your .csproj file
-//inside a . For example, if you are using US english
-//in your source files, set the to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("2e0dc051-c58e-4f51-b9c0-704a1994c326")]
// Version information for an assembly consists of the following four values:
//
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Properties/Resources.Designer.cs
--- a/MetroWpf/Stocks.UI/Properties/Resources.Designer.cs Tue Mar 20 15:07:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.261
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Stocks.UI.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Stocks.UI.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Properties/Resources.resx
--- a/MetroWpf/Stocks.UI/Properties/Resources.resx Tue Mar 20 15:07:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Properties/Settings.Designer.cs
--- a/MetroWpf/Stocks.UI/Properties/Settings.Designer.cs Tue Mar 20 15:07:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.261
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Stocks.UI.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Properties/Settings.settings
--- a/MetroWpf/Stocks.UI/Properties/Settings.settings Tue Mar 20 15:07:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Stocks.UI.csproj
--- a/MetroWpf/Stocks.UI/Stocks.UI.csproj Tue Mar 20 15:07:49 2012 +0000
+++ b/MetroWpf/Stocks.UI/Stocks.UI.csproj Tue Mar 20 16:53:29 2012 +0000
@@ -2,22 +2,18 @@
Debug
- x86
+ AnyCPU
8.0.30703
2.0
- {63E512BA-D038-4672-9C02-85DD49744E0F}
- WinExe
+ {BF20711D-4863-4FD3-9B6C-42D4E677D85C}
+ Library
Properties
Stocks.UI
Stocks.UI
v4.0
- Client
512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
-
- x86
+
true
full
false
@@ -26,8 +22,7 @@
prompt
4
-
- x86
+
pdbonly
true
bin\Release\
@@ -36,80 +31,50 @@
4
-
- ..\Libs\MvvmLight.Extras.4.0.0\GalaSoft.MvvmLight.Extras.WPF4.dll
-
..\Libs\MvvmLight.4.0.0\GalaSoft.MvvmLight.WPF4.dll
-
- ..\Libs\MvvmLight.Extras.4.0.0\Microsoft.Practices.ServiceLocation.dll
-
+
+
+
..\Libs\Rx-Main.1.0.11226\lib\Net4\System.Reactive.dll
-
- ..\Libs\System.Windows.Interactivity\System.Windows.Interactivity.dll
-
+
-
-
- 4.0
-
-
-
-
- MSBuild:Compile
- Designer
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
+
+
+
+
StocksView.xaml
- Code
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/StocksView.xaml
--- a/MetroWpf/Stocks.UI/StocksView.xaml Tue Mar 20 15:07:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/StocksView.xaml.cs
--- a/MetroWpf/Stocks.UI/StocksView.xaml.cs Tue Mar 20 15:07:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-using System.Windows.Controls;
-
-namespace Stocks.UI
-{
- ///
- /// Interaction logic for StocksView.xaml
- ///
- public partial class StocksView : UserControl
- {
- public StocksView()
- {
- InitializeComponent();
- }
- }
-}
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/StocksViewModel.cs
--- a/MetroWpf/Stocks.UI/StocksViewModel.cs Tue Mar 20 15:07:49 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Linq;
-using System.Reactive;
-using System.Reactive.Linq;
-using System.Windows.Input;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using Stocks.Common;
-using Stocks.Common.Events;
-
-namespace Stocks.UI
-{
- public class StocksViewModel : ViewModelBase
- {
- private readonly IStocksService _service;
-
- public BindingList DisplayStockPrices { get; set; }
- public ICommand ServiceCommand { get; set; }
- public ICommand SubscriptionCommand { get; set; }
-
- public StocksViewModel(IStocksService service)
- {
- _service = service;
- GetLatestPrices();
-
- SubscriptionCommand = new RelayCommand(SubscriptionCommandExecute);
- ServiceCommand = new RelayCommand(ServiceRunningCommandExecute);
-
- var priceUpdates = Observable.FromEventPattern(
- _service, "PriceChanged");
-
- priceUpdates.Where(e => Subscribed)
- //.Throttle(TimeSpan.FromSeconds(1))
- .Subscribe(PriceChanged);
- }
-
- public void PriceChanged(EventPattern e)
- {
- var displayRate = DisplayStockPrices.First(
- rate => rate.Symbol == e.EventArgs.Price.Symbol);
-
- if (displayRate != null)
- displayRate.Update(e.EventArgs.Price);
- }
-
-
- private void GetLatestPrices()
- {
- DisplayStockPrices = new BindingList();
- var currentRates = _service.GetFullCurrentPrices();
- foreach (var latestRate in currentRates)
- {
- var displayRate = DisplayStockPrice.Create(latestRate);
- DisplayStockPrices.Add(displayRate);
- }
- }
-
- private const string SubscribedPropertyName = "Subscribed";
- private bool _subscribed = false;
-
- public bool Subscribed
- {
- get { return _subscribed; }
- set
- {
- if (_subscribed == value) return;
- _subscribed = value;
- RaisePropertyChanged(SubscribedPropertyName);
- }
- }
-
- private const string ServiceRunningPropertyName = "ServiceRunning";
- private bool _serviceRunning;
-
- public bool ServiceRunning
- {
- get { return _serviceRunning; }
- set
- {
- if (_serviceRunning == value) return;
- _serviceRunning = value;
- RaisePropertyChanged(ServiceRunningPropertyName);
- }
- }
-
- private void ServiceRunningCommandExecute()
- {
- if (_service.IsRunning)
- {
- _service.Stop();
- ServiceRunning = false;
- }
- else
- {
- _service.Start();
- ServiceRunning = true;
- }
- }
-
- private void SubscriptionCommandExecute()
- {
- //toggle subscribed
- Subscribed = !Subscribed;
- }
- }
-}
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/ViewModels/StocksViewModel.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/MetroWpf/Stocks.UI/ViewModels/StocksViewModel.cs Tue Mar 20 16:53:29 2012 +0000
@@ -0,0 +1,109 @@
+using System;
+using System.ComponentModel;
+using System.Linq;
+using System.Reactive;
+using System.Reactive.Linq;
+using System.Windows.Input;
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Command;
+using Stocks.Common;
+using Stocks.Common.Events;
+using Stocks.UI.Models;
+
+namespace Stocks.UI.ViewModels
+{
+ public class StocksViewModel : ViewModelBase
+ {
+ private readonly IStocksService _service;
+
+ public BindingList DisplayStockPrices { get; set; }
+ public ICommand ServiceCommand { get; set; }
+ public ICommand SubscriptionCommand { get; set; }
+
+ public StocksViewModel(IStocksService service)
+ {
+ _service = service;
+ GetLatestPrices();
+
+ SubscriptionCommand = new RelayCommand(SubscriptionCommandExecute);
+ ServiceCommand = new RelayCommand(ServiceRunningCommandExecute);
+
+ var priceUpdates = Observable.FromEventPattern(
+ _service,
+ "PriceChanged");
+
+ priceUpdates.Where(e => Subscribed)
+ //.Throttle(TimeSpan.FromSeconds(1))
+ .Subscribe(PriceChanged);
+ }
+
+ public void PriceChanged(EventPattern e)
+ {
+ var displayRate = DisplayStockPrices.First(
+ rate => rate.Symbol == e.EventArgs.Price.Symbol);
+
+ if (displayRate != null)
+ displayRate.Update(e.EventArgs.Price);
+ }
+
+
+ private void GetLatestPrices()
+ {
+ DisplayStockPrices = new BindingList();
+ var currentRates = _service.GetFullCurrentPrices();
+ foreach (var latestRate in currentRates)
+ {
+ var displayRate = DisplayStockPrice.Create(latestRate);
+ DisplayStockPrices.Add(displayRate);
+ }
+ }
+
+ private const string SubscribedPropertyName = "Subscribed";
+ private bool _subscribed = false;
+
+ public bool Subscribed
+ {
+ get { return _subscribed; }
+ set
+ {
+ if (_subscribed == value) return;
+ _subscribed = value;
+ RaisePropertyChanged(SubscribedPropertyName);
+ }
+ }
+
+ private const string ServiceRunningPropertyName = "ServiceRunning";
+ private bool _serviceRunning;
+
+ public bool ServiceRunning
+ {
+ get { return _serviceRunning; }
+ set
+ {
+ if (_serviceRunning == value) return;
+ _serviceRunning = value;
+ RaisePropertyChanged(ServiceRunningPropertyName);
+ }
+ }
+
+ private void ServiceRunningCommandExecute()
+ {
+ if (_service.IsRunning)
+ {
+ _service.Stop();
+ ServiceRunning = false;
+ }
+ else
+ {
+ _service.Start();
+ ServiceRunning = true;
+ }
+ }
+
+ private void SubscriptionCommandExecute()
+ {
+ //toggle subscribed
+ Subscribed = !Subscribed;
+ }
+ }
+}
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Views/StocksView.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/MetroWpf/Stocks.UI/Views/StocksView.xaml Tue Mar 20 16:53:29 2012 +0000
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 MetroWpf/Stocks.UI/Views/StocksView.xaml.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/MetroWpf/Stocks.UI/Views/StocksView.xaml.cs Tue Mar 20 16:53:29 2012 +0000
@@ -0,0 +1,15 @@
+using System.Windows.Controls;
+
+namespace Stocks.UI.Views
+{
+ ///
+ /// Interaction logic for StocksView.xaml
+ ///
+ public partial class StocksView : UserControl
+ {
+ public StocksView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff -r a7a4cde39999 -r 399398841fd0 Stocks/Stocks.Service/App.config
--- a/Stocks/Stocks.Service/App.config Tue Mar 20 15:07:49 2012 +0000
+++ b/Stocks/Stocks.Service/App.config Tue Mar 20 16:53:29 2012 +0000
@@ -1,18 +1,18 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 Stocks/Stocks.Service/AssemblyInit.cs
--- a/Stocks/Stocks.Service/AssemblyInit.cs Tue Mar 20 15:07:49 2012 +0000
+++ b/Stocks/Stocks.Service/AssemblyInit.cs Tue Mar 20 16:53:29 2012 +0000
@@ -1,23 +1,23 @@
using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
using System.Reflection;
-using Ninject;
using NLog;
namespace Stocks.Service
{
- internal class AssemblyInit
- {
- private static Logger logger = LogManager.GetCurrentClassLogger();
+ internal class AssemblyInit
+ {
+ private static readonly Logger logger = LogManager.GetCurrentClassLogger();
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
- public AssemblyInit ()
- {
- var fvi = FileVersionInfo.GetVersionInfo(
- Assembly.GetExecutingAssembly().Location);
+ [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
+ public AssemblyInit()
+ {
+ FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(
+ Assembly.GetExecutingAssembly().Location);
- logger.Info("Init: {0} {1} ",
- Assembly.GetExecutingAssembly().GetName(),
- fvi.ProductVersion);
- }
- }
-}
+ logger.Info("Init: {0} {1} ",
+ Assembly.GetExecutingAssembly().GetName(),
+ fvi.ProductVersion);
+ }
+ }
+}
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 Stocks/Stocks.Service/NLog.config
--- a/Stocks/Stocks.Service/NLog.config Tue Mar 20 15:07:49 2012 +0000
+++ b/Stocks/Stocks.Service/NLog.config Tue Mar 20 16:53:29 2012 +0000
@@ -1,17 +1,17 @@
-
-
+
-
-
-
-
+
+
+
-
-
-
+
+
+
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 Stocks/Stocks.Service/NLog.xsd
--- a/Stocks/Stocks.Service/NLog.xsd Tue Mar 20 15:07:49 2012 +0000
+++ b/Stocks/Stocks.Service/NLog.xsd Tue Mar 20 16:53:29 2012 +0000
@@ -1,2585 +1,3035 @@
-
-
-
-
-
-
-
-
-
-
-
-
- Watch config file for changes and reload automatically.
-
-
-
-
- Print internal NLog messages to the console. Default value is: false
-
-
-
-
- Print internal NLog messages to the console error output. Default value is: false
-
-
-
-
- Write internal NLog messages to the specified file.
-
-
-
-
- Log level threshold for internal log messages. Default value is: Info.
-
-
-
-
- Global log level threshold for application log messages. Messages below this level won't be logged..
-
-
-
-
- Pass NLog internal exceptions to the application. Default value is: false.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Make all targets within this section asynchronous (creates additional threads but the calling thread isn't blocked by any target writes).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Prefix for targets/layout renderers/filters/conditions loaded from this assembly.
-
-
-
-
- Load NLog extensions from the specified file (*.dll)
-
-
-
-
- Load NLog extensions from the specified assembly. Assembly name should be fully qualified.
-
-
-
-
-
-
-
-
-
- Name of the logger. May include '*' character which acts like a wildcard. Allowed forms are: *, Name, *Name, Name* and *Name*
-
-
-
-
- Comma separated list of levels that this rule matches.
-
-
-
-
- Minimum level that this rule matches.
-
-
-
-
- Maximum level that this rule matches.
-
-
-
-
- Level that this rule matches.
-
-
-
-
- Comma separated list of target names.
-
-
-
-
- Ignore further rules if this one matches.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the file to be included. The name is relative to the name of the current config file.
-
-
-
-
- Ignore any errors in the include file.
-
-
-
-
-
-
- Variable name.
-
-
-
-
- Variable value.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Watch config file for changes and reload automatically.
+
+
+
+
+
+
+ Print internal NLog messages to the console. Default value is: false
+
+
+
+
+
+
+ Print internal NLog messages to the console error output. Default value is: false
+
+
+
+
+
+
+ Write internal NLog messages to the specified file.
+
+
+
+
+
+
+ Log level threshold for internal log messages. Default value is: Info.
+
+
+
+
+
+
+ Global log level threshold for application log messages. Messages below this level won't be logged..
+
+
+
+
+
+
+ Pass NLog internal exceptions to the application. Default value is: false.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Make all targets within this section asynchronous (creates additional threads but the calling thread isn't blocked by any target writes).
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
-
-
-
-
-
-
+
+
+
+
+
+ Prefix for targets/layout renderers/filters/conditions loaded from this assembly.
+
+
+
+
+
+
+ Load NLog extensions from the specified file (*.dll)
+
+
+
+
+
+
+ Load NLog extensions from the specified assembly. Assembly name should be fully qualified.
+
+
+
+
+
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Name of the logger. May include '*' character which acts like a wildcard. Allowed forms are: *, Name, *Name, Name* and *Name*
+
+
+
+
+
+
+ Comma separated list of levels that this rule matches.
+
+
+
+
+
+
+ Minimum level that this rule matches.
+
+
+
+
+
+
+ Maximum level that this rule matches.
+
+
+
+
+
+
+ Level that this rule matches.
+
+
+
+
+
+
+ Comma separated list of target names.
+
+
+
+
+
+
+ Ignore further rules if this one matches.
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
- Name of the target.
-
-
-
-
- Limit on the number of requests in the lazy writer thread request queue.
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the file to be included. The name is relative to the name of the current config file.
+
+
-
-
- Time in milliseconds to sleep between batches.
-
+
+
+
+ Ignore any errors in the include file.
+
+
-
-
- Number of log events that should be processed in a batch by the lazy writer thread.
-
+
+
+
+
+ Variable name.
+
-
-
- Action to be taken when the lazy writer thread request queue count exceeds the set limit.
-
+
+
+ Variable value.
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Indicates whether to use sliding timeout.
-
-
-
-
- Number of log events to be buffered.
-
-
-
-
- Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes.
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Limit on the number of requests in the lazy writer thread request queue.
+
+
+
+
+
+
+ Time in milliseconds to sleep between batches.
+
+
+
+
+
+
+ Number of log events that should be processed in a batch by the lazy writer thread.
+
+
+
+
+
+
+ Action to be taken when the lazy writer thread request queue count exceeds the set limit.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Indicates whether to use sliding timeout.
+
+
+
+
+
+
+ Number of log events to be buffered.
+
+
+
+
+
+
+ Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Indicates whether to append newline at the end of log message.
+
+
+
+
+
+
+ Instance of that is used to format log messages.
+
+
+
+
+
+
+ Action that should be taken if the message is larger than maxMessageSize.
+
+
+
+
+
+
+ Maximum message size in bytes.
+
+
+
+
+
+ Encoding to be used.
+
+
+
+
+
+ Size of the connection cache (number of connections which are kept alive).
+
+
+
+
+
+ Network address.
+
+
+
+
+
+ Indicates whether to keep connection open whenever possible.
+
+
+
+
+
+
+ Indicates whether to include source info (file name and line number) in the information sent over the network.
+
+
+
+
+
+
+ Indicates whether to include call site (class and method name) in the information sent over the network.
+
+
+
+
+
+
+ AppInfo field. By default it's the friendly name of the current AppDomain.
+
+
+
+
+
+ NDC item separator.
+
+
+
+
+
+ Indicates whether to include stack contents.
+
+
+
+
+
+
+ Indicates whether to include NLog-specific extensions to log4j schema.
+
+
+
+
+
+
+ Indicates whether to include dictionary contents.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
- Name of the target.
-
-
-
-
- Indicates whether to append newline at the end of log message.
-
-
-
- Instance of that is used to format log messages.
-
-
-
-
- Action that should be taken if the message is larger than maxMessageSize.
-
-
-
-
- Maximum message size in bytes.
-
-
-
-
- Encoding to be used.
-
-
-
-
- Size of the connection cache (number of connections which are kept alive).
-
-
-
-
- Network address.
-
-
-
-
- Indicates whether to keep connection open whenever possible.
-
-
-
-
- Indicates whether to include source info (file name and line number) in the information sent over the network.
-
-
-
-
- Indicates whether to include call site (class and method name) in the information sent over the network.
-
+
+
+ Layout that should be use to calcuate the value for the parameter.
+
+
-
-
- AppInfo field. By default it's the friendly name of the current AppDomain.
-
-
-
-
- NDC item separator.
-
-
-
-
- Indicates whether to include stack contents.
-
-
-
-
- Indicates whether to include NLog-specific extensions to log4j schema.
-
-
-
-
- Indicates whether to include dictionary contents.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Layout that should be use to calcuate the value for the parameter.
-
-
-
-
- Viewer parameter name.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
+
+
+ Viewer parameter name.
+
+
-
-
- Text to be rendered.
-
-
-
-
- Footer.
-
-
-
-
- Header.
-
-
-
-
- Indicates whether to send the log messages to the standard error instead of the standard output.
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Footer.
+
+
+
+
+ Header.
+
+
+
+
+
+ Indicates whether to send the log messages to the standard error instead of the standard output.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string.
+
+
+
+
+
+
+ Name of the database provider.
+
+
+
+
+
+
+ Indicates whether to use database transactions. Some data providers require this.
+
+
+
+
+
+
+ Name of the connection string (as specified in <connectionStrings> configuration section.
+
+
+
+
+
+
+ Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase.
+
+
+
+
+
+
+ Indicates whether to keep the database connection open between the log events.
+
+
+
+
+
+
+ Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string.
+
+
+
+
+
+
+ Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string.
+
+
+
+
+
+
+ Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string.
+
+
+
+
+
+
+ Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used.
+
+
+
+
+
+
+ Text of the SQL command to be run on each log level.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
- Name of the target.
-
-
-
-
- Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string.
-
-
-
-
- Name of the database provider.
-
-
-
-
- Indicates whether to use database transactions. Some data providers require this.
-
-
-
-
- Name of the connection string (as specified in <connectionStrings> configuration section.
-
+
+
+ Type of the command.
+
-
- Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase.
-
+
+
+ Connection string to run the command against. If not provided, connection string from the target is used.
+
+
-
-
- Indicates whether to keep the database connection open between the log events.
-
+
+
+
+ Indicates whether to ignore failures.
+
+
-
-
- Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string.
-
+
+
+ Command text.
+
-
-
- Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string.
-
-
-
-
- Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string.
-
+
+
+
+
+
+
+
+
+
+
+
+
+ Layout that should be use to calcuate the value for the parameter.
+
+
-
-
- Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used.
-
+
+
+
+ Database parameter name.
+
+
+
+
+
+
+ Database parameter precision.
+
+
-
-
- Text of the SQL command to be run on each log level.
-
+
+
+
+ Database parameter scale.
+
+
+
+
+
+
+ Database parameter size.
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Type of the command.
-
-
-
-
- Connection string to run the command against. If not provided, connection string from the target is used.
-
-
-
-
- Indicates whether to ignore failures.
-
-
-
-
- Command text.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Layout that should be use to calcuate the value for the parameter.
-
-
-
-
- Database parameter name.
-
-
-
-
- Database parameter precision.
-
-
-
-
- Database parameter scale.
-
-
-
-
- Database parameter size.
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Indicates whether to return to the first target after any successful write.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+ File encoding.
+
+
+
+
+ Line ending mode.
+
+
+
+
+
+ Size in bytes above which log files will be automatically archived.
+
+
+
+
+
+
+ Maximum number of archive files that should be kept.
+
+
+
+
+
+
+ Name of the file to be used for an archive.
+
+
+
+
+
+
+ Way file archives are numbered.
+
+
+
+
+
+
+ Indicates whether to automatically archive log files every time the specified time passes.
+
+
+
+
+
+
+ Indicates whether to replace file contents on each write instead of appending log message at the end.
+
+
+
+
+
+
+ File attributes (Windows only).
+
+
+
+
+
+
+ Name of the file to write to.
+
+
+
+
+
+
+ Indicates whether to delete old log file on startup.
+
+
+
+
+
+
+ Indicates whether to enable log file(s) to be deleted.
+
+
+
+
+
+
+ Indicates whether to create directories if they don't exist.
+
+
+
+
+
+
+ Indicates whether concurrent writes to the log file by multiple processes on the same host.
+
+
+
+
+
+
+ Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity.
+
+
+
+
+
+
+ Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger).
+
+
+
+
+
+
+ Indicates whether concurrent writes to the log file by multiple processes on different network hosts.
+
+
+
+
+
+
+ Delay in milliseconds to wait before attempting to write to the file again.
+
+
+
+
+
+
+ Number of times the write is appended on the file before NLog discards the log message.
+
+
+
+
+
+
+ Log file buffer size in bytes.
+
+
+
+
+
+
+ Indicates whether to automatically flush the file buffers after each log message.
+
+
+
+
+
+
+ Indicates whether to keep log file open instead of opening and closing it on each logging event.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Condition expression. Log events who meet this condition will be forwarded to the wrapped target.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+ Message box title.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Method name. The method must be public and static.
+
+
+
+
+
+ Class name.
+
+
+
+
+
+
-
-
-
-
-
- Name of the target.
-
-
-
-
- Layout used to format log messages.
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
- Name of the target.
-
-
-
-
- Indicates whether to return to the first target after any successful write.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
- Text to be rendered.
-
-
-
-
- Header.
-
-
-
-
- Footer.
-
-
-
-
- File encoding.
-
+
+
+ Layout that should be use to calcuate the value for the parameter.
+
+
-
-
- Line ending mode.
-
-
-
-
- Size in bytes above which log files will be automatically archived.
-
+
+
+
+ Name of the parameter.
+
+
-
-
- Maximum number of archive files that should be kept.
-
-
-
-
- Name of the file to be used for an archive.
-
-
-
-
- Way file archives are numbered.
-
+
+
+
+ Type of the parameter.
+
+
-
-
- Indicates whether to automatically archive log files every time the specified time passes.
-
-
-
-
- Indicates whether to replace file contents on each write instead of appending log message at the end.
-
-
-
-
- File attributes (Windows only).
-
-
-
-
- Name of the file to write to.
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Action that should be taken if the message is larger than maxMessageSize.
+
+
+
+
+
+
+ Indicates whether to append newline at the end of log message.
+
+
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+
+ Maximum message size in bytes.
+
+
+
+
+
+ Encoding to be used.
+
+
+
+
+
+ Size of the connection cache (number of connections which are kept alive).
+
+
+
+
+
+
+ Indicates whether to keep connection open whenever possible.
+
+
+
+
+
+ Network address.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Indicates whether to append newline at the end of log message.
+
+
+
+
+
+
+ Instance of that is used to format log messages.
+
+
+
+
+
+
+ Action that should be taken if the message is larger than maxMessageSize.
+
+
+
+
+
+
+ Maximum message size in bytes.
+
+
+
+
+
+ Encoding to be used.
+
+
+
+
+
+ Size of the connection cache (number of connections which are kept alive).
+
+
+
+
+
+ Network address.
+
+
+
+
+
+ Indicates whether to keep connection open whenever possible.
+
+
+
+
+
+
+ Indicates whether to include source info (file name and line number) in the information sent over the network.
+
+
+
+
+
+
+ Indicates whether to include call site (class and method name) in the information sent over the network.
+
+
+
+
+
+
+ AppInfo field. By default it's the friendly name of the current AppDomain.
+
+
+
+
+
+ NDC item separator.
+
+
+
+
+
+ Indicates whether to include stack contents.
+
+
+
+
+
+
+ Indicates whether to include NLog-specific extensions to log4j schema.
+
+
+
+
+
+
+ Indicates whether to include dictionary contents.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Indicates whether to perform layout calculation.
+
+
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Default filter to be applied when no specific rule matches.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Condition to be tested.
+
+
-
-
- Indicates whether to delete old log file on startup.
-
-
-
-
- Indicates whether to enable log file(s) to be deleted.
-
-
-
-
- Indicates whether to create directories if they don't exist.
-
-
-
-
- Indicates whether concurrent writes to the log file by multiple processes on the same host.
-
-
-
-
- Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity.
-
+
+
+
+ Resulting filter to be applied when the condition matches.
+
+
-
-
- Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger).
-
-
-
-
- Indicates whether concurrent writes to the log file by multiple processes on different network hosts.
-
-
-
-
- Delay in milliseconds to wait before attempting to write to the file again.
-
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Number of times to repeat each log message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Time to wait between retries in milliseconds.
+
+
+
+
+
+
+ Number of retries that should be attempted on the wrapped target in case of a failure.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Web service URL.
+
+
+
+
+ Encoding.
+
+
+
+
+
+ Protocol to be used when calling web service.
+
+
+
+
+
+
+ Web service namespace.
+
+
+
+
+
+
+ Web service method name.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Body layout (can be repeated multiple times).
+
+
+
+
+
+ Footer layout.
+
+
+
+
+ Header layout.
+
+
+
+
+ Quoting mode.
+
+
+
+
+ Quote Character.
+
+
+
+
+
+ Indicates whether CVS should include header.
+
+
+
+
+
+
+ Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom').
+
+
+
+
+
+ Column delimiter.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Layout of the column.
+
+
-
-
- Number of times the write is appended on the file before NLog discards the log message.
-
-
-
-
- Log file buffer size in bytes.
-
-
-
-
- Indicates whether to automatically flush the file buffers after each log message.
-
-
-
-
- Indicates whether to keep log file open instead of opening and closing it on each logging event.
-
+
+
+ Name of the column.
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Layout text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Body layout (can be repeated multiple times).
+
+
+
+
+
+ Header layout.
+
+
+
+
+ Footer layout.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Condition expression.
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+
+
+ Substring to be matched.
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+
+
+ Indicates whether to ignore case when comparing strings.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Indicates whether to ignore case when comparing strings.
+
+
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+
+
+ String to compare the layout to.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+
+
+ Substring to be matched.
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+
+
+ Indicates whether to ignore case when comparing strings.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Indicates whether to ignore case when comparing strings.
+
+
+
+
+
+
+ Layout to be used to filter log messages.
+
+
+
+
+
+
+ Action to be taken when filter matches.
+
+
+
+
+
+
+ String to compare the layout to.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Indicates whether to use the XML format when serializing message.
+
+
+
+
+
+
+ Encoding to be used when writing text to the queue.
+
+
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+
+ Indicates whether to use recoverable messages (with guaranteed delivery).
+
+
+
+
+
+
+ Indicates whether to create the queue if it doesn't exists.
+
+
+
+
+
+
+ Label to associate with each message.
+
+
+
+
+
+
+ Name of the queue to write to.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Maximum number of log events that the buffer can keep.
+
+
+
+
+
+
+ Indicates whether buffer should grow as needed.
+
+
+
+
+
+
+ Number of log events to be buffered.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Indicates whether to add <!-- --> comments around all written texts.
+
+
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+
+ Indicates whether to use default row highlighting rules.
+
+
+
+
+
+
+ Indicates whether the error stream (stderr) should be used instead of the output stream (stdout).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
-
-
- Name of the target.
-
+
+
+ Background color.
+
-
- Condition expression. Log events who meet this condition will be forwarded to the wrapped target.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Layout used to format log messages.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Layout used to format log messages.
-
-
-
-
- Message box title.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Method name. The method must be public and static.
-
-
-
-
- Class name.
-
+
+
+ Condition that must be met in order to set the specified foreground and background color.
+
+
-
-
-
-
-
-
-
-
-
-
-
- Layout that should be use to calcuate the value for the parameter.
-
-
-
-
- Name of the parameter.
-
-
-
-
- Type of the parameter.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
+
+
+ Foreground color.
+
-
-
- Action that should be taken if the message is larger than maxMessageSize.
-
-
-
-
- Indicates whether to append newline at the end of log message.
-
-
-
-
- Layout used to format log messages.
-
-
-
-
- Maximum message size in bytes.
-
-
-
-
- Encoding to be used.
-
-
-
-
- Size of the connection cache (number of connections which are kept alive).
-
-
-
-
- Indicates whether to keep connection open whenever possible.
-
-
-
-
- Network address.
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Indicates whether to append newline at the end of log message.
-
-
-
-
- Instance of that is used to format log messages.
-
-
-
-
- Action that should be taken if the message is larger than maxMessageSize.
-
-
-
-
- Maximum message size in bytes.
-
-
-
-
- Encoding to be used.
-
-
-
-
- Size of the connection cache (number of connections which are kept alive).
-
-
-
-
- Network address.
-
-
-
-
- Indicates whether to keep connection open whenever possible.
-
-
-
-
- Indicates whether to include source info (file name and line number) in the information sent over the network.
-
-
-
-
- Indicates whether to include call site (class and method name) in the information sent over the network.
-
-
-
-
- AppInfo field. By default it's the friendly name of the current AppDomain.
-
-
-
-
- NDC item separator.
-
-
-
-
- Indicates whether to include stack contents.
-
-
-
-
- Indicates whether to include NLog-specific extensions to log4j schema.
-
-
-
-
- Indicates whether to include dictionary contents.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Indicates whether to perform layout calculation.
-
-
-
-
- Layout used to format log messages.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Layout used to format log messages.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Default filter to be applied when no specific rule matches.
-
-
-
-
-
-
-
-
-
-
-
-
- Condition to be tested.
-
-
-
-
- Resulting filter to be applied when the condition matches.
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
- Name of the target.
-
-
-
-
- Number of times to repeat each log message.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Time to wait between retries in milliseconds.
-
-
-
-
- Number of retries that should be attempted on the wrapped target in case of a failure.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Web service URL.
-
-
-
-
- Encoding.
-
-
-
-
- Protocol to be used when calling web service.
-
-
-
-
- Web service namespace.
-
-
-
-
- Web service method name.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Body layout (can be repeated multiple times).
-
-
-
-
- Footer layout.
-
-
-
-
- Header layout.
-
-
-
-
- Quoting mode.
-
-
-
-
- Quote Character.
-
-
-
-
- Indicates whether CVS should include header.
-
-
-
-
- Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom').
-
-
-
-
- Column delimiter.
-
+
+
+ Background color.
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Layout of the column.
-
-
-
-
- Name of the column.
-
-
-
-
-
-
-
-
-
-
-
- Layout text.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Body layout (can be repeated multiple times).
-
-
-
-
- Header layout.
-
-
-
-
- Footer layout.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Condition expression.
-
-
-
-
- Action to be taken when filter matches.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Layout to be used to filter log messages.
-
-
-
-
- Substring to be matched.
-
-
-
-
- Action to be taken when filter matches.
-
-
-
-
- Indicates whether to ignore case when comparing strings.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Indicates whether to ignore case when comparing strings.
-
-
-
-
- Layout to be used to filter log messages.
-
-
-
-
- Action to be taken when filter matches.
-
-
-
-
- String to compare the layout to.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Layout to be used to filter log messages.
-
-
-
-
- Substring to be matched.
-
-
-
-
- Action to be taken when filter matches.
-
+
+
+ Foreground color.
+
-
- Indicates whether to ignore case when comparing strings.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Indicates whether to ignore case when comparing strings.
-
-
-
-
- Layout to be used to filter log messages.
-
-
-
-
- Action to be taken when filter matches.
-
-
-
-
- String to compare the layout to.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Indicates whether to use the XML format when serializing message.
-
-
-
-
- Encoding to be used when writing text to the queue.
-
-
-
-
- Layout used to format log messages.
-
-
-
-
- Indicates whether to use recoverable messages (with guaranteed delivery).
-
-
-
-
- Indicates whether to create the queue if it doesn't exists.
-
-
-
-
- Label to associate with each message.
-
-
-
-
- Name of the queue to write to.
-
+
+
+ Indicates whether to ignore case when comparing texts.
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Maximum number of log events that the buffer can keep.
-
-
-
-
- Indicates whether buffer should grow as needed.
-
-
-
-
- Number of log events to be buffered.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Layout used to format log messages.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Indicates whether to add <!-- --> comments around all written texts.
-
-
-
-
- Layout used to format log messages.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Text to be rendered.
-
-
-
-
- Header.
-
-
-
-
- Footer.
-
-
-
-
- Indicates whether to use default row highlighting rules.
-
-
-
-
- Indicates whether the error stream (stderr) should be used instead of the output stream (stdout).
-
+
+
+
+ Regular expression to be matched. You must specify either text or regex.
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Background color.
-
-
-
-
- Condition that must be met in order to set the specified foreground and background color.
-
-
-
-
- Foreground color.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Background color.
-
-
-
-
- Foreground color.
-
-
-
-
- Indicates whether to ignore case when comparing texts.
-
-
-
-
- Regular expression to be matched. You must specify either text or regex.
-
-
-
-
- Text to be matched. You must specify either text or regex.
-
-
-
-
- Indicates whether to match whole words only.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Footer.
-
-
-
-
- Text to be rendered.
-
-
-
-
- Header.
-
+
+
+
+ Text to be matched. You must specify either text or regex.
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Layout used to format log messages.
-
-
-
-
- Name of the machine on which Event Log service is running.
-
-
-
-
- Value to be used as the event Source.
-
-
-
-
- Layout that renders event Category.
-
-
-
-
- Layout that renders event ID.
-
-
-
-
- Name of the Event Log to write to. This can be System, Application or any user-defined name.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Layout used to format log messages.
-
-
-
-
- Indicates whether log text should be appended to the text of the control instead of overwriting it.
-
-
-
-
- Name of control to which NLog will log write log text.
-
-
-
-
- Name of the Form on which the control is located.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Username to change context to.
-
-
-
-
- User account password.
-
-
-
-
- Indicates whether to revert to the credentials of the process instead of impersonating another user.
-
-
-
-
- Required impersonation level.
-
-
-
-
- Windows domain name to change context to.
-
+
+
+
+ Indicates whether to match whole words only.
+
+
-
-
- Logon Type.
-
-
-
-
- Type of the logon provider.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Footer.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+ Header.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+
+ Name of the machine on which Event Log service is running.
+
+
+
+
+
+
+ Value to be used as the event Source.
+
+
+
+
+
+
+ Layout that renders event Category.
+
+
+
+
+
+
+ Layout that renders event ID.
+
+
+
+
+
+
+ Name of the Event Log to write to. This can be System, Application or any user-defined name.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+
+ Indicates whether log text should be appended to the text of the control instead of overwriting it.
+
+
+
+
+
+
+ Name of control to which NLog will log write log text.
+
+
+
+
+
+
+ Name of the Form on which the control is located.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Username to change context to.
+
+
+
+
+
+
+ User account password.
+
+
+
+
+
+
+ Indicates whether to revert to the credentials of the process instead of impersonating another user.
+
+
+
+
+
+
+ Required impersonation level.
+
+
+
+
+
+
+ Windows domain name to change context to.
+
+
+
+
+
+ Logon Type.
+
+
+
+
+
+ Type of the logon provider.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+ Header.
+
+
+
+
+ Footer.
+
+
+
+
+ Text to be rendered.
+
+
+
+
+
+ Indicates whether to send message as HTML instead of plain text.
+
+
+
+
+
+
+ Indicates whether to add new lines between log entries.
+
+
+
+
+
+
+ Encoding to be used for sending e-mail.
+
+
+
+
+
+ Mail subject.
+
+
+
+
+
+ Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
+
+
+
+
+
+
+ BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
+
+
+
+
+
+
+ CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
+
+
+
+
+
+
+ Sender's email address (e.g. joe@domain.com).
+
+
+
+
+
+
+ Mail message body (repeated for each log message send in one mail).
+
+
+
+
+
+
+ Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic").
+
+
+
+
+
+
+ Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server.
+
+
+
+
+
+
+ Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic").
+
+
+
+
+
+
+ SMTP Authentication mode.
+
+
+
+
+
+
+ SMTP Server to be used for sending.
+
+
+
+
+
+
+ Port number that SMTP Server is listening on.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Performance counter instance name.
+
+
+
+
+
+ Counter help text.
+
+
+
+
+
+ Performance counter type.
+
+
+
+
+
+
+ Indicates whether performance counter should be automatically created.
+
+
+
+
+
+
+ Name of the performance counter category.
+
+
+
+
+
+
+ Name of the performance counter.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+
+ Initial height of the form with rich text box.
+
+
+
+
+
+
+ Indicates whether scroll bar will be moved automatically to show most recent log entries.
+
+
+
+
+
+
+ Maximum number of lines the rich text box will store (or 0 to disable this feature).
+
+
+
+
+
+
+ Indicates whether the created form will be initially minimized.
+
+
+
+
+
+
+ Indicates whether the created window will be a tool window.
+
+
+
+
+
+
+ Name of RichTextBox to which Nlog will write.
+
+
+
+
+
+
+ Name of the Form on which the control is located. If there is no open form of a specified name than NLog will create a new one.
+
+
+
+
+
+
+ Initial width of the form with rich text box.
+
+
+
+
+
+
+ Indicates whether to use default coloring rules.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
- Name of the target.
-
-
-
-
- Header.
-
-
-
-
- Footer.
-
-
-
-
- Text to be rendered.
-
-
-
-
- Indicates whether to send message as HTML instead of plain text.
-
-
-
-
- Indicates whether to add new lines between log entries.
-
-
-
-
- Encoding to be used for sending e-mail.
-
-
-
-
- Mail subject.
-
-
-
-
- Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
-
-
-
-
- BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
-
-
-
-
- CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
-
-
-
-
- Sender's email address (e.g. joe@domain.com).
-
-
-
-
- Mail message body (repeated for each log message send in one mail).
-
-
-
-
- Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic").
-
-
-
-
- Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server.
-
-
-
-
- Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic").
-
-
-
-
- SMTP Authentication mode.
-
-
-
-
- SMTP Server to be used for sending.
-
-
-
-
- Port number that SMTP Server is listening on.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Performance counter instance name.
-
-
-
-
- Counter help text.
-
-
-
-
- Performance counter type.
-
-
-
-
- Indicates whether performance counter should be automatically created.
-
-
-
-
- Name of the performance counter category.
-
-
-
-
- Name of the performance counter.
-
+
+
+
+ Background color. Names are identical with KnownColor enum extended with Empty value which means that background color won't be changed.
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Font color. Names are identical with KnownColor enum extended with Empty value which means that font color won't be changed.
+
+
+
+
+
+
+ Indicates whether to ignore case when comparing texts.
+
+
+
+
+
+
+ Regular expression to be matched. You must specify either text or regex.
+
+
+
+
+
+
+ Font style of matched text. Possible values are the same as in FontStyle enum in System.Drawing.
+
+
+
+
+
+
+ Text to be matched. You must specify either text or regex.
+
+
+
+
+
+
+ Indicates whether to match whole words only.
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
- Name of the target.
-
-
-
-
- Layout used to format log messages.
-
+
+
+ Background color.
+
-
-
- Initial height of the form with rich text box.
-
-
-
-
- Indicates whether scroll bar will be moved automatically to show most recent log entries.
-
-
-
-
- Maximum number of lines the rich text box will store (or 0 to disable this feature).
-
+
+
+
+ Condition that must be met in order to set the specified font color.
+
+
-
-
- Indicates whether the created form will be initially minimized.
-
-
-
-
- Indicates whether the created window will be a tool window.
-
-
-
-
- Name of RichTextBox to which Nlog will write.
-
+
+
+ Font color.
+
-
-
- Name of the Form on which the control is located. If there is no open form of a specified name than NLog will create a new one.
-
-
-
-
- Initial width of the form with rich text box.
-
-
-
-
- Indicates whether to use default coloring rules.
-
+
+
+
+ Font style of matched text.
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Background color. Names are identical with KnownColor enum extended with Empty value which means that background color won't be changed.
-
-
-
-
- Font color. Names are identical with KnownColor enum extended with Empty value which means that font color won't be changed.
-
-
-
-
- Indicates whether to ignore case when comparing texts.
-
-
-
-
- Regular expression to be matched. You must specify either text or regex.
-
-
-
-
- Font style of matched text. Possible values are the same as in FontStyle enum in System.Drawing.
-
-
-
-
- Text to be matched. You must specify either text or regex.
-
-
-
-
- Indicates whether to match whole words only.
-
-
-
-
-
-
-
-
-
-
-
-
- Background color.
-
-
-
-
- Condition that must be met in order to set the specified font color.
-
-
-
-
- Font color.
-
-
-
-
- Font style of matched text.
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Layout used to format log messages.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name of the target.
-
-
-
-
- Name of the endpoint configuration in WCF configuration file.
-
-
-
-
- Endpoint address.
-
-
-
-
- Indicates whether to use binary message encoding.
-
-
-
-
- Client ID.
-
-
-
-
- Indicates whether to include per-event properties in the payload sent to the server.
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Layout used to format log messages.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name of the target.
+
+
+
+
+
+ Name of the endpoint configuration in WCF configuration file.
+
+
+
+
+
+ Endpoint address.
+
+
+
+
+
+ Indicates whether to use binary message encoding.
+
+
+
+
+
+ Client ID.
+
+
+
+
+
+ Indicates whether to include per-event properties in the payload sent to the server.
+
+
+
+
+
+
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 Stocks/Stocks.Service/Properties/AssemblyInfo.cs
--- a/Stocks/Stocks.Service/Properties/AssemblyInfo.cs Tue Mar 20 15:07:49 2012 +0000
+++ b/Stocks/Stocks.Service/Properties/AssemblyInfo.cs Tue Mar 20 16:53:29 2012 +0000
@@ -1,10 +1,10 @@
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
+
[assembly: AssemblyTitle("Stocks.Service")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
@@ -17,9 +17,11 @@
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
+
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
+
[assembly: Guid("fb5377de-bd32-4d1b-8cc3-7404f15e088e")]
// Version information for an assembly consists of the following four values:
@@ -32,5 +34,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
+
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 Stocks/Stocks.Service/StocksService.cs
--- a/Stocks/Stocks.Service/StocksService.cs Tue Mar 20 15:07:49 2012 +0000
+++ b/Stocks/Stocks.Service/StocksService.cs Tue Mar 20 16:53:29 2012 +0000
@@ -10,136 +10,146 @@
using Stocks.Common.Models;
namespace Stocks.Service
-{
- public class StocksService : IStocksService
- {
- private static readonly Logger Log = LogManager.GetCurrentClassLogger();
+{
+ public class StocksService : IStocksService
+ {
+ #region Delegates
- private IList _companies;
- private IConfigurationService _configurationService;
- private List _currentPrices;
- private string _serviceUrl;
- private IWebClientShim _webClient;
+ public delegate void PriceChangedEventHandler(object sender, PriceChangedEventArgs e);
- public bool IsActive { get; private set; }
- public SummaryStats Stats { get; private set; }
+ #endregion
+
+ private static readonly Logger Log = LogManager.GetCurrentClassLogger();
- public StocksService(
- IConfigurationService configurationService,
- IWebClientShim webClientShim)
- {
- new AssemblyInit();
-
- _webClient = webClientShim;
- _configurationService = configurationService;
- Stats = new SummaryStats();
+ private readonly IConfigurationService _configurationService;
+ private readonly IWebClientShim _webClient;
+ private IList _companies;
+ private List _currentPrices;
+ private string _serviceUrl;
- GetCompanyList();
- }
-
- private void GetCompanyList()
- {
- _companies = _configurationService.GetCompanies();
-
- string symbolsCsv = _companies.Select(
- c => c.Symbol).Aggregate((c, d) => c + "," + d);
- _serviceUrl = _configurationService.GetServiceUrl(symbolsCsv);
- }
+ public StocksService(
+ IConfigurationService configurationService,
+ IWebClientShim webClientShim)
+ {
+ new AssemblyInit();
- public event PriceChangedEventHandler PriceChanged;
- public delegate void PriceChangedEventHandler(object sender, PriceChangedEventArgs e);
- protected virtual void OnPriceChanged(Price price)
- {
- Stats.PriceChangeEvents++;
+ _webClient = webClientShim;
+ _configurationService = configurationService;
+ Stats = new SummaryStats();
- if (PriceChanged != null)
- PriceChanged(this, new PriceChangedEventArgs() { Price = price });
- }
+ GetCompanyList();
+ }
- public void Start()
- {
- PrepareForServiceStarting();
- Task.Factory.StartNew(() => DownloadPrices());
- }
+ public SummaryStats Stats { get; private set; }
+
+ #region IStocksService Members
- public void Stop()
- {
- IsActive = false;
- Log.Debug("StockService stopped");
- }
+ public bool IsActive { get; private set; }
+
+ public void Start()
+ {
+ PrepareForServiceStarting();
+ Task.Factory.StartNew(DownloadPrices);
+ }
- private void PrepareForServiceStarting()
- {
- Log.Debug("StockService starting");
- IsActive = true;
- Stats.Reset();
- _currentPrices = new List(_companies.Count);
- }
+ public void Stop()
+ {
+ IsActive = false;
+ Log.Debug("StockService stopped");
+ }
- private void DownloadPrices()
- {
- try
- {
- Stopwatch timeToDownload;
-
- while (IsActive)
- {
- string webResponse = TimedDelegates.Execute(
- _webClient.DownloadString,
- _serviceUrl,
- out timeToDownload);
+ #endregion
- PopulatePricesFromWebResponse(webResponse);
- UpdateStats(timeToDownload, webResponse);
- }
- }
- catch (Exception e)
- {
- Log.Error("Exception during DownloadPrices()");
- Log.Error("Stack Trace {0}: /r/nException Message: {1}", e.StackTrace, e.Message);
- this.Stop();
- }
- }
+ private void GetCompanyList()
+ {
+ _companies = _configurationService.GetCompanies();
+
+ string symbolsCsv = _companies.Select(
+ c => c.Symbol).Aggregate((c, d) => c + "," + d);
- private void PopulatePricesFromWebResponse(string webResponse)
- {
- string[] webPrices = webResponse.Split(
- new string[] { "\n", "\r\n" },
- StringSplitOptions.RemoveEmptyEntries);
+ _serviceUrl = _configurationService.GetServiceUrl(symbolsCsv);
+ }
+
+ public event PriceChangedEventHandler PriceChanged;
- foreach (string webPriceData in webPrices)
- {
- var webPrice = Factory.CreatePrice(webPriceData);
- var localPrice = _currentPrices.Find(x => x.Symbol == webPrice.Symbol);
+ protected virtual void OnPriceChanged(Price price)
+ {
+ Stats.PriceChangeEvents++;
- if (localPrice == null) {
- _currentPrices.Add(new Price(webPrice.Symbol, webPrice.CurrentPrice, webPrice.PreviousPrice));
- continue;
+ if (PriceChanged != null)
+ PriceChanged(this, new PriceChangedEventArgs {Price = price});
}
- if (localPrice.Equals(webPrice))
- continue;
- else
- UpdateLocalPrice(webPrice, localPrice);
- }
- }
+ private void PrepareForServiceStarting()
+ {
+ Log.Debug("StockService starting");
+ IsActive = true;
+ Stats.Reset();
+ _currentPrices = new List(_companies.Count);
+ }
+
+ private void DownloadPrices()
+ {
+ try
+ {
+ while (IsActive)
+ {
+ Stopwatch timeToDownload;
+ string webResponse = TimedDelegates.Execute(
+ _webClient.DownloadString,
+ _serviceUrl,
+ out timeToDownload);
+
+ PopulatePricesFromWebResponse(webResponse);
+ UpdateStats(timeToDownload, webResponse);
+ }
+ }
+ catch (Exception e)
+ {
+ Log.Error("Exception during DownloadPrices()");
+ Log.Error("Stack Trace {0}: /r/nException Message: {1}", e.StackTrace, e.Message);
+ Stop();
+ }
+ }
- private void UpdateLocalPrice(Price webPrice, Price localPrice)
- {
- localPrice.PreviousPrice = localPrice.CurrentPrice;
- localPrice.CurrentPrice = webPrice.CurrentPrice;
- OnPriceChanged(localPrice);
+ private void PopulatePricesFromWebResponse(string webResponse)
+ {
+ string[] webPrices = webResponse.Split(
+ new[] {"\n", "\r\n"},
+ StringSplitOptions.RemoveEmptyEntries);
+
+ foreach (string webPriceData in webPrices)
+ {
+ Price webPrice = Factory.CreatePrice(webPriceData);
+ Price localPrice = _currentPrices.Find(x => x.Symbol == webPrice.Symbol);
+
+ if (localPrice == null)
+ {
+ _currentPrices.Add(new Price(webPrice.Symbol, webPrice.CurrentPrice, webPrice.PreviousPrice));
+ continue;
+ }
+
+ if (!localPrice.Equals(webPrice))
+ UpdateLocalPrice(webPrice, localPrice);
+ }
+ }
+
+ private void UpdateLocalPrice(Price webPrice, Price localPrice)
+ {
+ localPrice.PreviousPrice = localPrice.CurrentPrice;
+ localPrice.CurrentPrice = webPrice.CurrentPrice;
+ OnPriceChanged(localPrice);
+ }
+
+ private void UpdateStats(Stopwatch timeToDownload, string webResponse)
+ {
+ Stats.LastWebRequest.Duration = (int) timeToDownload.ElapsedMilliseconds;
+ Stats.LastWebRequest.PricesDownloaded = _currentPrices.Count;
+ Stats.LastWebRequest.Response = webResponse;
+ Stats.LastWebRequest.Request = _serviceUrl;
+ Stats.LastWebRequest.SymbolCount = _companies.Count;
+ Stats.NumberOfRequests++;
+ Log.Trace(Stats);
+ }
}
-
- private void UpdateStats(Stopwatch timeToDownload, string webResponse)
- {
- Stats.LastWebRequest.Duration = (int)timeToDownload.ElapsedMilliseconds;
- Stats.LastWebRequest.PricesDownloaded = _currentPrices.Count;
- Stats.LastWebRequest.Response = webResponse;
- Stats.LastWebRequest.Request = _serviceUrl;
- Stats.LastWebRequest.SymbolCount = _companies.Count;
- Stats.NumberOfRequests++;
- Log.Trace(Stats);
- }
- }
}
\ No newline at end of file
diff -r a7a4cde39999 -r 399398841fd0 Stocks/Stocks.Service/packages.config
--- a/Stocks/Stocks.Service/packages.config Tue Mar 20 15:07:49 2012 +0000
+++ b/Stocks/Stocks.Service/packages.config Tue Mar 20 16:53:29 2012 +0000
@@ -1,5 +1,6 @@
+
-
-
+
+
\ No newline at end of file