-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathPrompterOneServiceCollectionExtensions.cs
More file actions
96 lines (90 loc) · 4.72 KB
/
PrompterOneServiceCollectionExtensions.cs
File metadata and controls
96 lines (90 loc) · 4.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
using ManagedCode.Storage.Browser.Extensions;
using ManagedCode.Storage.Core.Extensions;
using ManagedCode.Storage.VirtualFileSystem.Extensions;
using Microsoft.Extensions.DependencyInjection;
using PrompterOne.Core.Abstractions;
using PrompterOne.Core.Services;
using PrompterOne.Core.Services.Editor;
using PrompterOne.Core.Services.Media;
using PrompterOne.Core.Services.Preview;
using PrompterOne.Core.Services.Rsvp;
using PrompterOne.Core.Services.Streaming;
using PrompterOne.Core.Services.Workspace;
using PrompterOne.Shared.Localization;
using PrompterOne.Shared.Services.Diagnostics;
using PrompterOne.Shared.Services.Editor;
using PrompterOne.Shared.Settings.Services;
using PrompterOne.Shared.Storage;
using PrompterOne.Shared.Storage.Cloud;
namespace PrompterOne.Shared.Services;
public static class PrompterOneServiceCollectionExtensions
{
public static IServiceCollection AddPrompterOneShared(this IServiceCollection services)
{
services.AddStorageFactory();
services.AddBrowserStorageAsDefault(options =>
{
options.ContainerName = PrompterStorageDefaults.LocalBrowserContainerName;
options.DatabaseName = PrompterStorageDefaults.LocalBrowserDatabaseName;
options.ChunkSizeBytes = PrompterStorageDefaults.BrowserChunkSizeBytes;
options.ChunkBatchSize = PrompterStorageDefaults.BrowserChunkBatchSize;
});
services.AddVirtualFileSystem(options =>
{
options.DefaultContainer = PrompterStorageDefaults.LocalBrowserContainerName;
});
services.AddScoped<TpsParser>();
services.AddScoped<ScriptCompiler>();
services.AddScoped<TpsExporter>();
services.AddScoped<TpsFrontMatterDocumentService>();
services.AddScoped<TpsTextEditor>();
services.AddScoped<TpsStructureEditor>();
services.AddScoped<EditorLocalAssistant>();
services.AddScoped<RsvpOrpCalculator>();
services.AddScoped<RsvpEmotionAnalyzer>();
services.AddScoped<RsvpTextProcessor>();
services.AddScoped<RsvpPlaybackEngine>();
services.AddScoped<IScriptPreviewService, ScriptPreviewService>();
services.AddScoped<EditorOutlineBuilder>();
services.AddScoped<EditorInterop>();
services.AddScoped<ILibraryFolderRepository, BrowserLibraryFolderRepository>();
services.AddScoped<IScriptRepository, BrowserScriptRepository>();
services.AddScoped<IScriptSessionService, ScriptSessionService>();
services.AddScoped<IMediaPermissionService, BrowserMediaPermissionService>();
services.AddScoped<IMediaDeviceService, BrowserMediaDeviceService>();
services.AddScoped<IMediaSceneService, MediaSceneService>();
services.AddScoped<CrossTabMessageBus>();
services.AddScoped<BrowserSettingsStore>();
services.AddScoped<IUserSettingsStore>(serviceProvider => serviceProvider.GetRequiredService<BrowserSettingsStore>());
services.AddScoped<IBrowserSettingsChangeNotifier>(serviceProvider => serviceProvider.GetRequiredService<BrowserSettingsStore>());
services.AddScoped<AiProviderSettingsStore>();
services.AddScoped<BrowserCloudStorageStore>();
services.AddScoped<BrowserFileStorageStore>();
services.AddScoped<BrowserThemeService>();
services.AddScoped<AppCulturePreferenceService>();
services.AddScoped<CloudStorageProviderFactory>();
services.AddScoped<CloudStorageTransferService>();
services.AddScoped<StudioSettingsStore>();
services.AddScoped<CameraPreviewInterop>();
services.AddScoped<LearnRsvpLayoutInterop>();
services.AddScoped<MicrophoneLevelInterop>();
services.AddScoped<TeleprompterReaderInterop>();
services.AddScoped<AppBootstrapper>();
services.AddScoped<AppShellService>();
services.AddScoped<BrowserConnectivityService>();
services.AddScoped<GoLiveSessionService>();
services.AddScoped<GoLiveOutputInterop>();
services.AddScoped<GoLiveOutputRuntimeService>();
services.AddScoped<GoLiveRemoteSourceInterop>();
services.AddScoped<GoLiveRemoteSourceRuntimeService>();
services.AddScoped<StreamingPublishDescriptorResolver>();
services.AddScoped<UiDiagnosticsService>();
services.AddSingleton<IGoLiveSourceModule, LiveKitSourceModule>();
services.AddSingleton<IGoLiveSourceModule, VdoNinjaSourceModule>();
services.AddSingleton<IGoLiveOutputModule, LocalRecordingOutputModule>();
services.AddSingleton<IGoLiveOutputModule, LiveKitOutputModule>();
services.AddSingleton<IGoLiveOutputModule, VdoNinjaOutputModule>();
services.AddSingleton<IGoLiveModuleRegistry, GoLiveModuleRegistry>();
return services;
}
}