/// <summary> /// Generate an output for an function description. /// </summary> /// <param name="myAggregate">The function.</param> /// <param name="myAggrName">The function name.</param> /// <returns>List of readouts with the information.</returns> private IVertexView GenerateOutput(IGQLFunction myFunc, String myFuncName) { var function = new Dictionary <String, Object>(); var setableParameters = new Dictionary <String, object>(); var parameters = new Dictionary <String, object>(); var edges = new Dictionary <String, IEdgeView>(); function.Add("Function", myFunc.PluginShortName); function.Add("Description", myFunc.PluginDescription); if (myFunc.GetReturnType() != null) { function.Add("ReturnType", myFunc.GetReturnType().Name); } int count = 1; foreach (var parameter in ((IPluginable)myFunc).SetableParameters) { setableParameters.Add("Parameter " + count.ToString() + " Key: ", parameter.Key); count++; } count = 1; foreach (var parameter in myFunc.GetParameters()) { parameters.Add("Parameter " + count.ToString() + " Name: ", parameter.Name); count++; } edges.Add("SetableParameters", new SingleEdgeView(null, new VertexView(setableParameters, null))); edges.Add("Parameters", new SingleEdgeView(null, new VertexView(parameters, null))); return(new VertexView(function, edges)); }
/// <summary> /// Generate an output for an function description. /// </summary> /// <param name="myAggregate">The function.</param> /// <param name="myAggrName">The function name.</param> /// <returns>List of readouts with the information.</returns> private IVertexView GenerateOutput(IGQLFunction myFunc, String myFuncName) { var function = new Dictionary<String, Object>(); var setableParameters = new Dictionary<String, object>(); var parameters = new Dictionary<String, object>(); var edges = new Dictionary<String, IEdgeView>(); function.Add("Function", myFunc.PluginShortName); function.Add("Description", myFunc.PluginDescription); if (myFunc.GetReturnType() != null) function.Add("ReturnType", myFunc.GetReturnType().Name); int count = 1; foreach (var parameter in ((IPluginable)myFunc).SetableParameters) { setableParameters.Add("Parameter " + count.ToString() + " Key: ", parameter.Key); count++; } count = 1; foreach (var parameter in myFunc.GetParameters()) { parameters.Add("Parameter " + count.ToString() + " Name: ", parameter.Name); count++; } edges.Add("SetableParameters", new SingleEdgeView(null, new VertexView(setableParameters, null))); edges.Add("Parameters", new SingleEdgeView(null, new VertexView(parameters, null))); return new VertexView(function, edges); }
/// <summary> /// Generate an output for an function description. /// </summary> /// <param name="myAggregate">The function.</param> /// <param name="myAggrName">The function name.</param> /// <returns>List of readouts with the information.</returns> private IVertexView GenerateOutput(IGQLFunction myFunc, String myFuncName) { var _Function = new Dictionary<String, Object>(); var temp = new Dictionary<String, object>(); var temp2 = new Dictionary<String, object>(); var edges = new Dictionary<String, IEdgeView>(); _Function.Add("Function", myFunc.FunctionName); _Function.Add("Type", myFuncName); _Function.Add("Description", myFunc.GetDescribeOutput()); int count = 1; foreach (var parameter in ((IPluginable)myFunc).SetableParameters) { temp.Add("Parameter " + count.ToString() + " Key: ", parameter.Key); count++; } count = 1; foreach (var parameter in myFunc.GetParameters()) { temp2.Add("Parameter " + count.ToString() + " Name: ", parameter.Name); count++; } edges.Add("SetableParameters", new SingleEdgeView(null, new VertexView(temp, null))); edges.Add("Parameters", new SingleEdgeView(null, new VertexView(temp2, null))); return new VertexView(_Function, edges); }