//api/Namespace/List public ActionResponseSchemas List(Guid sessionId, string schema) { UInt64 processId = Program.Core.Sessions.UpsertSessionId(sessionId); Thread.CurrentThread.Name = string.Format("API:{0}:{1}", processId, Utility.GetCurrentMethod()); Program.Core.Log.Trace(Thread.CurrentThread.Name); ActionResponseSchemas result = new ActionResponseSchemas(); try { var persistSchemas = Program.Core.Schemas.GetList(processId, schema); foreach (var persistSchema in persistSchemas) { result.Add(persistSchema.ToPayload()); } result.Success = true; } catch (Exception ex) { result.Message = ex.Message; } return(result); }
public ActionResponseSchemas List([FromBody] ActionGenericBase action) { var session = Program.Core.Sessions.GetSession(action.SessionId); Thread.CurrentThread.Name = $"API:{session.InstanceKey}:{Utility.GetCurrentMethod()}"; Program.Core.Log.Trace(Thread.CurrentThread.Name); ActionResponseSchemas result = new ActionResponseSchemas(); try { var persistSchemas = Program.Core.Schemas.GetList(session, action.SchemaName); foreach (var persistSchema in persistSchemas) { result.Add(persistSchema.ToPayload()); } result.Success = true; } catch (Exception ex) { result.Message = ex.Message; } return(result); }