public RunRequestProperty(MethodStructure methodStructure) : base("RunRequestProperty") { tagValues = new Dictionary <string, string> { { nameTag, methodStructure.IsRPC ? methodStructure.Name : NamingHelpers.GetRestfullMethodName(methodStructure) }, { urlTag, methodStructure.URL }, { methodTag, HttpHelpers.GetHTTPMethod(methodStructure) }, { parameterSourceBindingTag, HttpHelpers.GetRequestParametersSourceObject(methodStructure) }, { resultTypeTag, !methodStructure.Result.IsSytemType && methodStructure.Result.TypeName != null?Configuration.Instance.ModelsNameFactory(methodStructure.Result.TypeName) : "null" } }; }
public RunMethodRequest(MethodStructure methodStructure, string name) : base("RunMethodRequest") { tagValues = new Dictionary <string, string> { { controllerNameTag, name }, { nameTag, methodStructure.IsRPC ? methodStructure.Name : NamingHelpers.GetRestfullMethodName(methodStructure) }, { parameterTag, methodStructure.Parameters.GetCSV(x => x.Name) }, { requestObjectTag, methodStructure.Parameters.GetCSV(x => $"{x.Name}:{x.Name}") } }; childRenderbles.Add((JSRenderble)DI.Get <IRunRequestMethodComment>(methodStructure)); }
public RunMethodRequest(MethodStructure methodStructure) : base(Resources.runRequestMethod) { Name = methodStructure.IsRPC ? methodStructure.Name : NamingHelpers.GetRestfullMethodName(methodStructure); Comment = JSBuilderIOCContainer.Instance.CreateComment(); Comment.Description = $"Method to invoke request to {methodStructure.URL}. Method: {HttpHelpers.GetHTTPMethod(methodStructure)}."; Comment.Params = methodStructure.Parameters.ToDictionary(k => k.Name, v => JSTypeMapping.GetJSType(v)); Comment.ReturnType = JSTypeMapping.GetJSType(methodStructure.Result); Comment.ReturnType.IsPromise = true; Parameters = methodStructure.Parameters.Select(x => x.Name).ToList(); }
private void setPropertyName(MethodStructure methodStructure) { Name = $"_{(methodStructure.IsRPC ? methodStructure.Name : NamingHelpers.GetRestfullMethodName(methodStructure))}"; }