public override Task <EchoData> Echo(EchoData request, ServerCallContext context) { _logger.LogInformation("Host: {0}, Peer: {1}, Method: {2}", context.Host, context.Peer, context.Method); return(Task.FromResult(new EchoData { Message = "Echo: " + request.Message })); }
public void ExecuteParameterWithObjectParamters() { Incubator inc = new Incubator(); inc.Set(new Echo()); EchoData data = new EchoData(); data.BoolProperty = true; data.StringProperty = "dlhsddfflk"; data.IntProperty = 888; JsonRpcRequest request = JsonRpcRequest.Create <Echo>(inc, "TestObjectParameter", data, "some addditional stuff"); JsonRpcResponse response = request.Execute(); Expect.IsNotNull(response.Result); OutLine(response.Result.ToString(), ConsoleColor.Cyan); }
// -------------------------------------------------------------------- private void OnGUI() { GUILayout.Label("Vertices: " + mVertices.Count); Material = EditorGUILayout.ObjectField(Material, typeof(Material), false) as Material; Echo = EditorGUILayout.ObjectField(Echo, typeof(EchoData), false) as EchoData; if (Echo) { Radius = EditorGUILayout.FloatField("Radius", Radius); Density = EditorGUILayout.FloatField("Density", Density); if (GUILayout.Button("Cast")) { GeneratePoints(); } if (GUILayout.Button("Clear")) { if (EditorUtility.DisplayDialog("Delete all points", "Are you sure you want to remove all points?", "Yes", "No")) { ClearAll(); } } if (GUILayout.Button("Load")) { ClearAll(); for (int i = 0; i < Echo.Vertices.Length; ++i) { mVertices.Add(Echo.Vertices[i]); mNormals.Add(Echo.Normals[i]); mIndices.Add(mVertices.Count - 1); } } if (GUILayout.Button("Save")) { Echo.Vertices = mVertices.ToArray(); Echo.Normals = mNormals.ToArray(); EditorUtility.SetDirty(Echo); } } }
public ActionResult <EchoData> Post([FromBody] EchoData value) { value.Text = $"ECHO: {value.Text}"; return(value); }