예제 #1
0
        static void Main(string[] args)
        {
            IServiceCollection services = new ServiceCollection();

            services.AddLogging(l =>
            {
                l.AddConsole(c =>
                {
                    c.LogToStandardErrorThreshold = LogLevel.Trace;
                });
            });
            services
            .AddFastDFSCore(c =>
            {
                c.Trackers = new List <Tracker>()
                {
                    new Tracker("192.168.0.6", 22122)
                };
            })
            .AddFastDFSDotNetty()
            .AddSingleton <ISampleAppService, SampleAppService>();
            var provider = services.BuildServiceProvider();

            _sampleAppService = provider.GetService <ISampleAppService>();

            RunAsync();

            Console.ReadLine();
        }
예제 #2
0
 public ProductInfoViewModel(Product item)
 {
     Title    = item.Name;
     _item    = item;
     _service = ServiceLocator.Instance.Resolve <ISampleAppService>();
     Refresh();
 }
예제 #3
0
 public MainViewModel(ISampleAppService sampleappservice, IMvxMessenger messenger)
 {
     _sampleAppService = sampleappservice;
     ReloadList();
     _messenger = messenger;
     _listChangedToken = _messenger.Subscribe<SampleAppChangedMessage>(OnListChanged);
 }
예제 #4
0
        static void Main(string[] args)
        {
            IServiceCollection services = new ServiceCollection();

            services.AddLogging(l =>
            {
                l.SetMinimumLevel(LogLevel.Trace);
                l.AddConsole();
            });
            services
            .AddFastDFSCore()
            //.AddFastDFSDotNetty()
            .AddFastDFSSuperSocket()
            .AddSingleton <ISampleAppService, SampleAppService>();
            var provider = services.BuildServiceProvider();

            var option = provider.GetRequiredService <IOptions <FastDFSOptions> >().Value;

            option.ClusterConfigurations.Add(new ClusterConfiguration()
            {
                Name     = "Cluster1",
                Trackers = new List <Tracker>()
                {
                    new Tracker("192.168.0.98", 22122)
                },
                AntiStealToken = true,
                SecretKey      = "123456"
            });

            _sampleAppService = provider.GetService <ISampleAppService>();

            RunAsync();

            Console.ReadLine();
        }
 public SampleAppService_Tests(
     ISampleAppService sampleAppService,
     ICurrentTenant currentTenant)
     : base(currentTenant)
 {
     _sampleAppService = sampleAppService;
 }
예제 #6
0
        public LoginPage()
        {
            InitializeComponent();
            _service = ServiceLocator.Instance.Resolve <ISampleAppService>();

            DataResource();
        }
예제 #7
0
 public ClientDemoService(
     ISampleAppService sampleAppService,
     IIdentityModelAuthenticationService authenticationService,
     IConfiguration configuration)
 {
     _sampleAppService      = sampleAppService;
     _authenticationService = authenticationService;
     _configuration         = configuration;
 }
예제 #8
0
 public ClientDemoService(
     ISampleAppService sampleAppService,
     IIdentityModelAuthenticationService authenticationService,
     IConfigurationAccessor configurationAccessor,
     IBookAppService bookAppService)
 {
     _sampleAppService      = sampleAppService;
     _authenticationService = authenticationService;
     _configurationAccessor = configurationAccessor;
     _bookAppService        = bookAppService;
 }
예제 #9
0
 public SampleController(ISampleAppService sampleAppService)
 {
     _sampleAppService = sampleAppService;
 }
 public SampleAppService_Tests()
 {
     _sampleAppService = GetRequiredService <ISampleAppService>();
 }
예제 #11
0
 public PersonBaseViewModel(ISampleAppService sampleAppService, IMvxLocationWatcher locationWatcher)
 {
     SampleAppService = sampleAppService;
        LocationWatcher = locationWatcher;
 }
예제 #12
0
 public SampleController(ISampleAppService appService)
 {
     AppService = appService;
 }
예제 #13
0
 public ProductViewModel()
 {
     Title    = "Produkty";
     _service = ServiceLocator.Instance.Resolve <ISampleAppService>();
     Refresh();
 }
예제 #14
0
파일: MainForm.cs 프로젝트: gmalulu/FacCigo
 public MainForm(ISampleAppService sampleAppService)
 {
     InitializeComponent();
     this.sampleAppService = sampleAppService;
 }
예제 #15
0
 public PersonDetailViewModel(ISampleAppService sampleAppService, IMvxLocationWatcher locationWatcher)
     : base(sampleAppService, locationWatcher)
 {
 }
예제 #16
0
 public PersonAddViewModel(ISampleAppService sampleAppService, IMvxLocationWatcher locationWatcher)
     : base(sampleAppService, locationWatcher)
 {
     Person = new Person();
 }