public StepBinding(IBindingMethod method, BindingType bindingType, Regex regex, BindingScope bindingScope) { Method = method; BindingType = bindingType; Regex = regex; BindingScope = bindingScope; }
protected bool Equals(BindingType other) { return string.Equals(Name, other.Name) && string.Equals(FullName, other.FullName); }
private StepBindingNew CreateStepBinding(CodeAttribute2 attr, CodeFunction codeFunction, BindingType bindingType, BindingScopeNew bindingScope) { try { IBindingMethod bindingMethod = new VsBindingMethod(codeFunction); var regexArg = attr.Arguments.Cast<CodeAttributeArgument>().FirstOrDefault(); if (regexArg == null) return null; var regexString = VsxHelper.ParseCodeStringValue(regexArg.Value, regexArg.Language); var regex = new Regex("^" + regexString + "$", RegexOptions.Compiled | RegexOptions.CultureInvariant); return new StepBindingNew(bindingMethod, bindingType, regex, bindingScope); } catch(Exception) { return null; } }
private StepBindingNew GetBingingFromAttribute(CodeAttribute2 codeAttribute, CodeFunction codeFunction, BindingType bindingType, BindingScopeNew bindingScope) { try { if (codeAttribute.FullName.Equals(string.Format("TechTalk.SpecFlow.{0}Attribute", bindingType))) return CreateStepBinding(codeAttribute, codeFunction, bindingType, bindingScope); return null; } catch(Exception) { return null; } }
protected bool Equals(BindingType other) { return(string.Equals(Name, other.Name) && string.Equals(FullName, other.FullName)); }