Пример #1
0
        public AssetData(JObject value)
        {
            var token = value.Root;

            Amount = Convert.ToInt64(value.TryGetValue(AMOUNT_FIELD_KEY, out token) ? token.ToObject <object>() : 0);
            Asset  = value.TryGetValue(ASSET_ID_FIELD_KEY, out token) ? token.ToObject <SpaceTypeId>() : SpaceTypeId.EMPTY;
        }
Пример #2
0
 public static bool IsNullOrEmpty(this SpaceTypeId sti) => sti.IsNull() || SpaceTypeId.EMPTY.Equals(sti);
Пример #3
0
 public AssetData(long amount, SpaceTypeId asset)
 {
     Amount = amount;
     Asset  = asset;
 }