/// <summary> /// Creates a new instance around a <see cref="ProductionTokenDelegate"/> /// </summary> /// <param name="productionTokenDelegate"> /// <see cref="ProductionTokenDelegateRule"/> to attach. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="productionTokenDelegate"/> is a null reference. /// </exception> public ProductionTokenDelegateRule(ProductionTokenDelegate productionTokenDelegate) : base(true) { if (productionTokenDelegate==null) throw new ArgumentNullException("productionTokenDelegate"); this.productionTokenDelegate=productionTokenDelegate; this.Name = productionTokenDelegate.Method.Name; }
/// <summary> /// Creates a new instance around a <see cref="ProductionTokenDelegate"/> /// </summary> /// <param name="productionTokenDelegate"> /// <see cref="ProductionTokenDelegateRule"/> to attach. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="productionTokenDelegate"/> is a null reference. /// </exception> public ProductionTokenDelegateRule(ProductionTokenDelegate productionTokenDelegate) : base(true) { if (productionTokenDelegate == null) { throw new ArgumentNullException("productionTokenDelegate"); } this.productionTokenDelegate = productionTokenDelegate; this.Name = productionTokenDelegate.Method.Name; }
/// <summary> /// Creates a <see cref="IRule"/> that executes an <see cref="ProductionTokenDelegate"/>. /// </summary> /// <param name="del"> /// <see cref="ProductionTokenDelegate"/> to execute /// </param> /// <returns> /// <see cref="ProductionTokenDelegateRule"/> instance that contains /// <paramref name="del"/> /// </returns> public static ProductionTokenDelegateRule Method(ProductionTokenDelegate del) { return(new ProductionTokenDelegateRule(del)); }
/// <summary> /// Creates a <see cref="IRule"/> that executes an <see cref="ProductionTokenDelegate"/>. /// </summary> /// <param name="del"> /// <see cref="ProductionTokenDelegate"/> to execute /// </param> /// <returns> /// <see cref="ProductionTokenDelegateRule"/> instance that contains /// <paramref name="del"/> /// </returns> public static ProductionTokenDelegateRule Method(ProductionTokenDelegate del) { return new ProductionTokenDelegateRule(del); }