/// <summary> /// Adds a instance of <see cref="VroomJsEngineFactory"/> to /// the specified <see cref="JsEngineFactoryCollection" /> /// </summary> /// <param name="source">Instance of <see cref="JsEngineFactoryCollection" /></param> /// <returns>Instance of <see cref="JsEngineFactoryCollection" /></returns> public static JsEngineFactoryCollection AddVroom(this JsEngineFactoryCollection source) { if (source == null) { throw new ArgumentNullException("source"); } return source.AddVroom(new VroomSettings()); }
/// <summary> /// Adds a instance of <see cref="VroomJsEngineFactory"/> to /// the specified <see cref="JsEngineFactoryCollection" /> /// </summary> /// <param name="source">Instance of <see cref="JsEngineFactoryCollection" /></param> /// <param name="configure">The delegate to configure the provided <see cref="VroomSettings"/></param> /// <returns>Instance of <see cref="JsEngineFactoryCollection" /></returns> public static JsEngineFactoryCollection AddVroom(this JsEngineFactoryCollection source, Action<VroomSettings> configure) { if (source == null) { throw new ArgumentNullException("source"); } if (configure == null) { throw new ArgumentNullException("configure"); } var settings = new VroomSettings(); configure(settings); return source.AddVroom(settings); }