Exemplo n.º 1
0
        public static BitgoAssetMapEntity Create(string brokerId, string assetSymbol, string bitgoWalletId, string bitgoCoin)
        {
            var entity = new BitgoAssetMapEntity()
            {
                PartitionKey  = GeneratePartitionKey(brokerId),
                RowKey        = GenerateRowKey(assetSymbol),
                BrokerId      = brokerId,
                AssetSymbol   = assetSymbol,
                BitgoCoin     = bitgoCoin,
                BitgoWalletId = bitgoWalletId
            };

            return(entity);
        }
        public static BitgoAssetMapEntity Create(string brokerId, string assetSymbol, string bitgoWalletId,
                                                 string enabledBitgoWalletIds, string bitgoCoin, double minBalance, string tagSeparator = null)
        {
            var entity = new BitgoAssetMapEntity()
            {
                PartitionKey          = GeneratePartitionKey(brokerId),
                RowKey                = GenerateRowKey(assetSymbol),
                BrokerId              = brokerId,
                AssetSymbol           = assetSymbol,
                BitgoCoin             = bitgoCoin,
                BitgoWalletId         = bitgoWalletId,
                EnabledBitgoWalletIds = enabledBitgoWalletIds,
                MinBalance            = minBalance,
                TagSeparator          = tagSeparator
            };

            if (!entity.EnabledBitgoWalletIds.Contains(entity.BitgoWalletId))
            {
                entity.EnabledBitgoWalletIds += ";" + entity.BitgoWalletId;
            }

            return(entity);
        }