コード例 #1
0
 public StepMethodInvoker(StepType stepType, MethodBase method, KeyValuePair <string, object>[] supportedParameters = null)
 {
     Method            = method;
     Type              = stepType;
     Parameters        = method.BindParameters(supportedParameters);
     Name              = new StepName(Type, method.Name, supportedParameters);
     SourceDescription = $"{method.DeclaringType?.FullName}.{method.Name}";
 }
コード例 #2
0
 public StepMethodInvoker(StepType stepType, MethodBase method, KeyValuePair<string, object>[] supportedParameters = null)
 {
     Method = method;
     Type = stepType;
     Parameters = method.BindParameters(supportedParameters);
     Name = new StepName(Type, method.Name, supportedParameters);
     ExceptionExpected = method.AttributeOrDefault<ThrowsAttribute>() != null;
     SourceDescription = string.Format("{0}.{1}", method.DeclaringType.FullName, method.Name);
 }
コード例 #3
0
 public StepMethodInvoker(StepType stepType, MethodBase method, KeyValuePair <string, object>[] supportedParameters = null)
 {
     Method            = method;
     Type              = stepType;
     Parameters        = method.BindParameters(supportedParameters);
     Name              = new StepName(Type, method.Name, supportedParameters);
     ExceptionExpected = method.AttributeOrDefault <ThrowsAttribute>() != null;
     SourceDescription = string.Format("{0}.{1}", method.DeclaringType.FullName, method.Name);
 }
コード例 #4
0
 public StepClassInvoker(StepType stepType, Type stepClass, KeyValuePair<string,object>[] supportedParameters, IExceptionHandler exceptionHandler)
 {
     if (!typeof(Step).IsAssignableFrom(stepClass))
         throw new ArgumentException("The stepClass must inherit from Step", "stepClass");
     _stepClass = stepClass;
     _exceptionHandler = exceptionHandler;
     Type = stepType;
     Name = new StepName(Type, _stepClass.Name, supportedParameters);
     Parameters = _stepClass.GetConstructors().Single().BindParameters(supportedParameters);
 }
コード例 #5
0
 public StepClassInvoker(StepType stepType, Type stepClass, KeyValuePair <string, object>[] supportedParameters, IExceptionHandler exceptionHandler)
 {
     if (!typeof(Step).GetTypeInfo().IsAssignableFrom(stepClass))
     {
         throw new ArgumentException("The stepClass must inherit from Step", "stepClass");
     }
     _stepClass        = stepClass;
     _exceptionHandler = exceptionHandler;
     Type       = stepType;
     Name       = new StepName(Type, _stepClass.Name, supportedParameters);
     Parameters = _stepClass.GetTypeInfo().GetConstructors().Single().BindParameters(supportedParameters);
 }
コード例 #6
0
ファイル: StepName.cs プロジェクト: CaseyMacPherson/Kekiri
 protected bool Equals(StepName other)
 {
     return StepType == other.StepType && string.Equals(PrettyName, other.PrettyName);
 }
コード例 #7
0
ファイル: StepName.cs プロジェクト: smarts/kekiri
 protected bool Equals(StepName other)
 {
     return(StepType == other.StepType && string.Equals(PrettyName, other.PrettyName));
 }