SuperMap.Web.iServerJava6R.NetworkAnalyst.SupplyCenter.FromJson C# (CSharp) Méthode

FromJson() public static méthode

${iServerJava6R_SupplyCenter_method_fromJson_D}
public static FromJson ( System.Json.JsonObject json ) : SupplyCenter
json System.Json.JsonObject ${iServerJava6R_SupplyCenter_method_fromJson_param_jsonObject}
Résultat SupplyCenter
        public static SupplyCenter FromJson(JsonObject json)
        {
            if (json == null)
                return null;

            SupplyCenter result = new SupplyCenter();
            result.MaxWeight = (double)json["maxWeight"];
            result.NodeID = (int)json["nodeID"];
            result.ResourceValue = (double)json["resourceValue"];
            result.Type = (SupplyCenterType)Enum.Parse(typeof(SupplyCenterType), (string)json["type"], true);
            return result;
        }