public override void BuildComponents(IComponentBuilder builder)
 {
     builder.ConfigureComponent <WebServer>().SingleInstance();
     builder.ConfigureComponent <VariableRouter>().SingleInstance().PropertiesAutowired();
     builder.ConfigureComponent <FormatRouter>().SingleInstance().PropertiesAutowired();
     builder.ConfigureComponent <FormatWebSocketRouter>().SingleInstance().PropertiesAutowired();
     builder.ConfigureComponent <VariableWebSocketRouter>().SingleInstance().PropertiesAutowired();
 }
Exemple #2
0
 public override void BuildComponents(IComponentBuilder builder)
 {
     builder.ConfigureComponent <RegisteredTabs>();
     builder.ConfigureWpfWindow <Main>();
     builder.ConfigureUIComponent <PluginsTab>();
     builder.ConfigureUIComponent <ConfigurationTab>();
 }
Exemple #3
0
 public static void UseMemoryDataCollector <TCollector, TMatched, TTerminated>(this IComponentBuilder builder)
     where TCollector : MemoryDataCollector <TCollector, TMatched, TTerminated>
     where TMatched : ProcessMatchedEvent <TMatched>
     where TTerminated : ProcessTerminatedEvent <TTerminated>
 {
     builder.ConfigureComponent <TCollector>().SingleInstance();
     builder.ConfigureStaticEventHandler <MemoryDataCollector <TCollector, TMatched, TTerminated> .MatchedHandler>();
     builder.ConfigureStaticEventHandler <MemoryDataCollector <TCollector, TMatched, TTerminated> .TerminatedHandler>();
 }
        public override void BuildComponents(IComponentBuilder builder)
        {
            // database
            builder.ConfigureDbContext <OsuDatabaseContext>();
            builder.ConfigureDbContext <BeatmapDownloaderDatabaseContext>();

            // configuration
            builder.UseConfigurationModel <BeatmapDownloaderConfiguration>("MultiPlayerDownloaderUI");

            // service
            builder.ConfigureComponent <BeatmapSearchService>().SingleInstance();
            builder.ConfigureComponent <MultiplayerDownloadService>().SingleInstance();
            builder.ConfigureComponent <BeatmapDownloadService>().SingleInstance();

            // download providers
            builder.ConfigureDownloadProvider <SayobotDownloadProvider>();
            builder.ConfigureDownloadProvider <BloodcatDownloadProvider>();
        }
Exemple #5
0
        public override void BuildComponents(IComponentBuilder builder)
        {
            // Db context
            builder.ConfigureDbContext <BeatmapDownloaderDatabaseContext>();

            // configurations
            builder.UsePluginOptionsModel <MultiPlayerDownloaderUI, BeatmapDownloaderConfiguration>();

            // view models for UI
            builder.ConfigureComponent <DownloadProvidersViewModel>().SingleInstance();
            builder.ConfigureComponent <DownloadHistoryViewModel>().SingleInstance();

            // configuration UI
            builder.ConfigureUIModel <MultiPlayerDownloaderUI, BeatmapDownloaderConfiguration>();

            // UI
            builder.ConfigureUIComponent <MultiplayerDownloaderTab>();
        }
 public static void ConfigureDbContext <T>(this IComponentBuilder builder)
     where T : EmberDbContext
 {
     if (!builder.ParentScope.TryResolve <SqliteConfiguration>(out _))
     {
         throw new NullReferenceException("Can't resolve SqliteInformation, try build kernel with 'UseEFSqlite()' option.");
     }
     builder.ConfigureComponent <T>().SingleInstance();
 }
Exemple #7
0
 public override void BuildComponents(IComponentBuilder builder)
 {
     builder.ConfigureComponent <StatisticEditorViewModel>().AsSelf().As <IEditorContextViewModel>().SingleInstance().PropertiesAutowired();
     builder.ConfigureUIComponent <StatisticEditorTab>();
 }
 public override void BuildComponents(IComponentBuilder builder)
 {
     builder.ConfigureDbContext <StatisticContext>();
     builder.ConfigureComponent <StatisticManager>().SingleInstance().PropertiesAutowired();
 }
 public static void ConfigureDownloadProvider <T>(this IComponentBuilder builder)
     where T : IDownloadProvier, IComponent, new()
 {
     Resolve(builder.ParentScope).RegisterComponent <T>();
     builder.ConfigureComponent <T>().AsSelf().Named <IDownloadProvier>(typeof(T).Name);
 }
 public static void ConfigureUIComponent <TComponent>(this IComponentBuilder builder) where TComponent : IViewComponent, new()
 {
     Resolve(builder.ParentScope).RegisterComponent <TComponent>();
     builder.ConfigureComponent <TComponent>().SingleInstance();
 }
Exemple #11
0
 public override void BuildComponents(IComponentBuilder builder)
 {
     builder.ConfigureDbContext <OsuDatabaseContext>();
     builder.ConfigureComponent <DatabaseSynchronizer>().SingleInstance();
 }
Exemple #12
0
 public override void BuildComponents(IComponentBuilder builder)
 {
     builder.ConfigureEventStatistic <PlayerInformationEvent>();
     builder.ConfigureComponent <PlayerInformationCrawler>().SingleInstance().PropertiesAutowired();
 }
 public override void BuildComponents(IComponentBuilder builder)
 {
     builder.ConfigureComponent <PpCalculatorService>().SingleInstance();
 }