public Task <MethodResult <MethodInfo> > GetMethodInfo(ClientConnection clt, Payloads.Generic.String ep) { if (!_clientMethods.ContainsKey(ep.Value)) { return(Task.FromResult(MethodResult <MethodInfo> .FromError("Method endpoint unknown"))); } return(Task.FromResult(MethodResult <MethodInfo> .FromResult(new MethodInfo() { EndPoint = ep.Value, ParamPayloadType = _clientMethods[ep.Value].ParamPayloadType, ResultPayloadType = _clientMethods[ep.Value].ResultPayloadType } ))); }
public Task <MethodResult <StringList> > GetEventPublishers(ClientConnection clt, Payloads.Generic.String ep) { StringList sl = new StringList(); if (!_events.ContainsKey(ep.Value)) { return(Task.FromResult(MethodResult <StringList> .FromError("Event EndPoint unknown"))); } foreach (ClientConnection connection in _events[ep.Value].Publishers) { sl.List.Add(connection.EndPoint.ToString()); } return(Task.FromResult(MethodResult <StringList> .FromResult(sl))); }