コード例 #1
0
        /// <summary>
        /// Adds a instance of <see cref="EFFCChakraCoreJsEngineFactory"/> 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 AddEFFCChakraCore(this JsEngineFactoryCollection source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            return(source.AddEFFCChakraCore(new EFFCChakraCoreSettings()));
        }
コード例 #2
0
        /// <summary>
        /// Adds a instance of <see cref="EFFCChakraCoreJsEngineFactory"/> 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="EFFCChakraCoreSettings"/></param>
        /// <returns>Instance of <see cref="JsEngineFactoryCollection" /></returns>
        public static JsEngineFactoryCollection AddEFFCChakraCore(this JsEngineFactoryCollection source,
                                                                  Action <EFFCChakraCoreSettings> configure)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            if (configure == null)
            {
                throw new ArgumentNullException("configure");
            }

            var settings = new EFFCChakraCoreSettings();

            configure(settings);

            return(source.AddEFFCChakraCore(settings));
        }