Add project files.
This commit is contained in:
44
OemanTrader.WPF/App.xaml.cs
Normal file
44
OemanTrader.WPF/App.xaml.cs
Normal file
@ -0,0 +1,44 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using OemanTrader.FinantialModelingPrepAPI.Services;
|
||||
using OemanTrader.WPF.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace OemanTrader.WPF
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
//new MajorIndexService().GetMajorIndex(Domain.Models.MajorIndexType.DowJones).ContinueWith((t) =>
|
||||
//{
|
||||
// var index = t.Result;
|
||||
//});
|
||||
|
||||
Window window = new MainWindow();
|
||||
window.DataContext = new MainViewModel();
|
||||
window.Show();
|
||||
|
||||
base.OnStartup(e);
|
||||
}
|
||||
|
||||
private IServiceProvider CreateServiceProvider()
|
||||
{
|
||||
// 1. Singelton - one instance per application
|
||||
// 2. Transient - different instance everytime
|
||||
// 3. Scoped - one instance per "scope"
|
||||
|
||||
IServiceCollection services = new ServiceCollection();
|
||||
return services.BuildServiceProvider();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user