Example #1
0
        /// <summary>
        /// Adds builder into the provider by the specified factory and builder identifiers.
        /// </summary>
        /// <param name="provider">The factory provider.</param>
        /// <param name="builderId">The identifier of the builder.</param>
        /// <param name="handler">The builder handler.</param>
        public static void AddBuilder <TResult, TBuilderId>(this IFactoryProvider provider, TBuilderId builderId, Func <TResult> handler)
        {
            if (handler == null)
            {
                throw new ArgumentNullException(nameof(handler));
            }

            var builder = new BuilderFunc <TResult>(handler);

            AddBuilder(provider, typeof(TResult), builderId, builder);
        }
Example #2
0
 public MultiInputGate(int x, int y, BuilderFunc func)
     : base(x, y)
 {
     Function = func;
 }
Example #3
0
 public SingleInputGate(int x, int y, BuilderFunc func)
     : base(x, y)
 {
     Function = func;
 }