Exemplo n.º 1
0
 public void Prune_NonGettableProperties()
 {
     foreach (var Rev in ModelRevisions)
     {
         Rev.Prune_NonGettableProperties();
     }
 }
Exemplo n.º 2
0
        private BWebServiceResponse ListRevisions(Action <string> _ErrorMessageAction)
        {
            if (!CommonMethods.TryGettingModelInfo(
                    DatabaseService,
                    RequestedModelID,
                    out JObject _,
                    true, out ModelDBEntry Model,
                    out BWebServiceResponse FailureResponse,
                    _ErrorMessageAction))
            {
                return(FailureResponse);
            }

            var Result = new JArray();

            foreach (var Rev in Model.ModelRevisions)
            {
                Rev.Prune_NonGettableProperties();
                Result.Add(JObject.Parse(JsonConvert.SerializeObject(Rev)));
            }

            return(BWebResponse.StatusOK("List revisions operation has succeeded", new JObject()
            {
                [ModelDBEntry.MODEL_REVISIONS_PROPERTY] = Result
            }));
        }