/// <summary>
 /// Parse ContractMethodDescription from json
 /// </summary>
 /// <param name="json">Json</param>
 /// <returns>Return ContractMethodDescription</returns>
 public static ContractMethodDescriptor FromJson(JObject json)
 {
     return(new ContractMethodDescriptor
     {
         Name = json["name"].AsString(),
         Parameters = ((JArray)json["parameters"]).Select(u => ContractParameterDefinition.FromJson(u)).ToArray(),
     });
 }
Esempio n. 2
0
 /// <summary>
 /// Parse ContractMethodDescription from json
 /// </summary>
 /// <param name="json">Json</param>
 /// <returns>Return ContractMethodDescription</returns>
 public new static ContractMethodDescriptor FromJson(JObject json)
 {
     return(new ContractMethodDescriptor
     {
         Name = json["name"].AsString(),
         Parameters = ((JArray)json["parameters"]).Select(u => ContractParameterDefinition.FromJson(u)).ToArray(),
         ReturnType = (ContractParameterType)Enum.Parse(typeof(ContractParameterType), json["returnType"].AsString()),
     });
 }