public void WriteCommand(FFprobeCommand command) { var inputResource = new Input(command.Resource); BuilderBase.Append(" "); BuilderBase.Append(SettingSerializer.Serialize(inputResource)); command.Settings.ForEach(WriteSerializerSpecifier); }
private void WriteResource(CommandInput resource) { if (resource == null) { throw new ArgumentNullException("resource"); } WriteResourcePreSettings(resource); var inputResource = new Input(resource.Resource); BuilderBase.Append(" "); BuilderBase.Append(SettingSerializer.Serialize(inputResource)); WriteResourcePostSettings(resource); }
public void Input_Verify() { var settingWrong1 = new Input(null); var setting = new Input(Resource.From("c:\\apple.mp4")); Assert.Throws<InvalidOperationException>(() => { var s = settingWrong1.GetAndValidateString(); }); Assert.DoesNotThrow(() => { var s = setting.GetAndValidateString(); }); Assert.Equal(setting.GetAndValidateString(), "-i \"c:/apple.mp4\""); }
public void Input_Verify() { var setting = new Input(Resource.From("c:\\apple.mp4")); Assert.DoesNotThrow(() => SettingSerializer.Serialize(setting)); Assert.Equal(SettingSerializer.Serialize(setting), "-i \"c:/apple.mp4\""); }
private void WriteResource(CommandInput resource) { if (resource == null) { throw new ArgumentNullException("resource"); } var settingsData = Validate.GetSettingCollectionData(resource.Settings); WriteResourcePreSettings(resource, settingsData); var inputResource = new Input(resource.Resource); _builderBase.Append(" "); _builderBase.Append(inputResource); WriteResourcePostSettings(resource, settingsData); }