private void ProcessStepArgumentTransformationAttribute(BindingSourceMethod bindingSourceMethod, BindingSourceAttribute stepArgumentTransformationAttribute) { string regex = stepArgumentTransformationAttribute.TryGetAttributeValue <string>(0) ?? stepArgumentTransformationAttribute.TryGetAttributeValue <string>("Regex"); if (!ValidateStepArgumentTransformation(bindingSourceMethod, stepArgumentTransformationAttribute)) { return; } var stepArgumentTransformationBinding = bindingFactory.CreateStepArgumentTransformation(regex, bindingSourceMethod.BindingMethod); ProcessStepArgumentTransformationBinding(stepArgumentTransformationBinding); }
private void ProcessStepDefinitionAttribute(BindingSourceMethod bindingSourceMethod, BindingSourceAttribute stepDefinitionAttribute, BindingScope scope) { var stepDefinitionTypes = GetStepDefinitionTypes(stepDefinitionAttribute); string regex = stepDefinitionAttribute.TryGetAttributeValue <string>(0); if (!ValidateStepDefinition(bindingSourceMethod, stepDefinitionAttribute)) { return; } foreach (var stepDefinitionType in stepDefinitionTypes) { var stepDefinitionBinding = bindingFactory.CreateStepBinding(stepDefinitionType, regex, bindingSourceMethod.BindingMethod, scope); ProcessStepDefinitionBinding(stepDefinitionBinding); } }
private int GetHookOrder(BindingSourceAttribute hookAttribute) { return(hookAttribute.TryGetAttributeValue("Order", 10000)); }