/// <summary> /// Set the <see cref="AsciiDoctorJRunnerSettings.Backend"/> to a builtin backend. /// Possible values are <see cref="BuiltinBackend"/>. /// For non-builtin backends (i.e. plugins) use <see cref="WithBackend(AsciiDoctorJRunnerSettings, string)"/>. /// </summary> /// <param name="this">The <see cref="AsciiDoctorJRunnerSettings"/> that extended by this.</param> /// <param name="backend">The <see cref="BuiltinBackend"/> to set.</param> /// <returns>The reference to the <see cref="AsciiDoctorJRunnerSettings"/>.</returns> public static AsciiDoctorJRunnerSettings WithBuiltinBackend(this AsciiDoctorJRunnerSettings @this, BuiltinBackend backend) { // ReSharper disable PossibleNullReferenceException @this.Backend = Enum.GetName(typeof(BuiltinBackend), backend) !.ToLowerInvariant(); // ReSharper enable PossibleNullReferenceException return(@this); }
/// <summary> /// Set the <see cref="AsciiDoctorJRunnerSettings.Backend"/> to a builtin backend. /// Possible values <seealso cref="BuiltinBackend"/> /// </summary> /// <param name="this"></param> /// <param name="backend"></param> /// <returns></returns> public static AsciiDoctorJRunnerSettings WithBuiltinBackend(this AsciiDoctorJRunnerSettings @this, BuiltinBackend backend) { @this.Backend = Enum.GetName(typeof(BuiltinBackend), backend).ToLower(CultureInfo.InvariantCulture); return(@this); }