public bool HasArgumentsWithSameNameButDifferentTypes(ServiceArguments other) { if (other.Arguments.Count != Arguments.Count) return false; for (var i = 0; i < other.Arguments.Count; i++) { if (other.Arguments[i].Name == Arguments[i].Name && other.Arguments[i].Type != Arguments[i].Type) return true; } return false; }
internal void RegisterServiceArguments(Type type) { if (!IsApplicableForGeneration(type)) return; foreach (var method in GetApplicableControllerMethods(type)) { var methodParameters = method.GetParameters(); var serviceArgs = new ServiceArguments(); foreach (var param in methodParameters) { serviceArgs.Arguments.Add(new ServiceArgumentType { Name = param.Name, Type = param.ParameterType }); } _argumentTypes.Add(type.FullName + ":" + method.Name, serviceArgs); } }