/// <summary> /// Initializes a new instance of the <see cref="BindAttribute"/> class. /// </summary> /// <param name="verb">The verb.</param> /// <param name="target">The target.</param> public BindAttribute(BindVerb verb, string target) { if (BindPointUtilities.IsVerbQualified(target)) throw new ApplicationException( String.Format("Bind attributes may not use both the BindVerb and an HTTP Verb in the bind specification: '{0}'", target)); this.target = verb.ToString() + " " + target.Trim(); }
internal GenBinding(string _url, string _controller, bool _matchStatus,BindVerb _verb) { initialUrl = _url; initialController = _controller; matchStatus = _matchStatus; items = GetSplitItems(initialUrl); }
private void AddNewBinding(BindVerb verb, string bindUrl,ITypeInfo classInfo) { allBindings[verb].Add(new GenBinding[2] { new GenBinding(bindUrl, classInfo.FullName, true, verb), new GenBinding(bindUrl, classInfo.FullName, false, verb) }); }
private List<MethodUrlsSubset> CreateGroups(BindVerb verb) { MethodUrlsSubset firstGroup = new MethodUrlsSubset(); List<MethodUrlsSubset> allGroups = new List<MethodUrlsSubset>(); List<MethodUrlsSubset> newBindingGroups; allGroups.Add(firstGroup); List<IEnumerable<GenBinding>> bindingsForVerb = allBindings[verb]; foreach (IEnumerable<GenBinding> bindingsPair in bindingsForVerb) { newBindingGroups = new List<MethodUrlsSubset>(); foreach (MethodUrlsSubset group in allGroups) { foreach (GenBinding binding in bindingsPair) { MethodUrlsSubset newGroup = group.ApplyBinding(binding); if (newGroup != null) newBindingGroups.Add(newGroup); } } allGroups = newBindingGroups; } return allGroups; }