public ScreenCastStreamerConfiguration(IVideoStreamerConfiguration videoConfiguration, IStreamersConfiguration streamersConfiguration, IConfigurationSource source) : base(source) { DeviceNameProperty = CreateProperty(nameof(DeviceName), DEFAULT_DeviceName, source); if (videoConfiguration is IConfiguration) { var videoConfig = videoConfiguration as IConfiguration; var videoSettings = videoConfig.Settings.ToDictionary(s => s.Key); FFmpegCodecArgsProperty = new ConfigurationSettingProperty(nameof(FFmpegCodecArgs), videoSettings[nameof(videoConfiguration.FFmpegCodecArgs)], DefaultSection); StopRecordingTimeoutMillisecondsProperty = new ConfigurationSettingProperty(nameof(StopRecordingTimeoutMilliseconds), videoSettings[nameof(videoConfiguration.StopRecordingTimeoutMilliseconds)], DefaultSection); ExtensionProperty = new ConfigurationSettingProperty(nameof(Extension), videoSettings[nameof(videoConfiguration.Extension)], DefaultSection); } else { FFmpegCodecArgsProperty = new ConfigurationSettingProperty(nameof(FFmpegCodecArgs), typeof(string), videoConfiguration.FFmpegCodecArgs, DefaultSection); StopRecordingTimeoutMillisecondsProperty = new ConfigurationSettingProperty(nameof(StopRecordingTimeoutMilliseconds), typeof(int), videoConfiguration.StopRecordingTimeoutMilliseconds, DefaultSection); ExtensionProperty = new ConfigurationSettingProperty(nameof(Extension), typeof(string), videoConfiguration.Extension, DefaultSection); } if (streamersConfiguration is IConfiguration) { var streamersConfig = streamersConfiguration as IConfiguration; var streamersSettings = streamersConfig.Settings.ToDictionary(s => s.Key); AutoSelectDeviceProperty = new ConfigurationSettingProperty(nameof(AutoSelectDevice), streamersSettings[nameof(streamersConfiguration.AutoSelectDevice)], DefaultSection); } else { AutoSelectDeviceProperty = new ConfigurationSettingProperty(nameof(AutoSelectDevice), typeof(bool), streamersConfiguration.AutoSelectDevice, DefaultSection); } }
public SessionRecordingSettings(SessionDefinition definition, string sessionId, DateTime openedAt) { ISettings sessionSection; _storage.TryGetSection(SETTINGS_SECTION_SESSION, out sessionSection); StartedAtProperty = new ConfigurationSettingProperty("StartedAt", typeof(DateTime), DateTime.MinValue, sessionSection); FinishedAtProperty = new ConfigurationSettingProperty("FinishedAt", typeof(DateTime), DateTime.MinValue, sessionSection); OpenedAtProperty = new ConfigurationSettingProperty("OpenedAt", openedAt, sessionSection); IdProperty = new ConfigurationSettingProperty("Id", sessionId, sessionSection); NameProperty = new ConfigurationSettingProperty("Name", definition.Name, sessionSection); ProjectProperty = new ConfigurationSettingProperty("Project", definition.Project, sessionSection); }
public AudioStreamerRecordingConfiguration(IAudioStreamerConfiguration configuration) { if (configuration is IConfiguration) { var config = (IConfiguration)configuration; var settings = config.Settings.ToDictionary(s => s.Key); StopRecordingTimeoutMillisecondsProperty = new ConfigurationSettingProperty(nameof(StopRecordingTimeoutMilliseconds), settings[nameof(IAudioStreamerConfiguration.StopRecordingTimeoutMilliseconds)]); } else { StopRecordingTimeoutMillisecondsProperty = new ConfigurationSettingProperty(nameof(StopRecordingTimeoutMilliseconds), typeof(int), configuration.StopRecordingTimeoutMilliseconds); } }
public LocalSessionRecorderConfiguration(ISessionsConfiguration configuration) { CreateSessionFolderProperty = new ConfigurationSettingProperty(nameof(CreateSessionFolder), typeof(bool), DEFAULT_CreateSessionFolder); var settings = configuration.Settings.ToDictionary(s => s.Key); if (settings.ContainsKey(nameof(ISessionsConfiguration.TargetPath))) { TargetPathProperty = new ConfigurationSettingProperty(nameof(TargetPath), settings[nameof(ISessionsConfiguration.TargetPath)]); } else { TargetPathProperty = new ConfigurationSettingProperty(nameof(TargetPath), typeof(string), configuration.TargetPath); } }
public BufferSessionRecorderConfiguration() { BufferSizeProperty = new ConfigurationSettingProperty(nameof(BufferSize), typeof(double), DEFAULT_BufferSize); }
public EyeTrackerRecordingConfiguration() { FrequencyProperty = new ConfigurationSettingProperty(nameof(Frequency), typeof(double), DEFAULT_Frequency); }
public DependentConfiguration(ITestConfigurationProperties properties) { var storage = new DictionarySettings(); FrequencyProperty = new ConfigurationSettingProperty(properties.FrequencyProperty, storage); }