Exemplo n.º 1
0
 public AssetPairDiscoveryResultMessage(AssetPairDiscoveryRequestMessage requestRequest, AssetPairNetworks discoverFirst, IEnumerable <AssetPairNetworks> discovered)
 {
     Discovered            = discovered.ToList();
     RequestRequestMessage = requestRequest;
     DiscoverFirst         = discoverFirst;
     IsFailed = DiscoverFirst == null || DiscoverFirst.Providers.Count == 0;
 }
Exemplo n.º 2
0
 private void Discover(AssetPair pair)
 {
     DiscoverFirst = DiscoverSpecified(pair) ??
                     Discover(pair, Context.ReversalEnabled) ??
                     DiscoverPegged(pair, Context.ReversalEnabled, Context.PeggedEnabled) ??
                     DiscoverIntermediary(pair);
 }
Exemplo n.º 3
0
 private void DoIntermediary(AssetPairNetworks networks)
 {
     if (networks.IsPegged)
     {
         AssetPegged = networks.Pair.Asset2;
     }
     else if (networks.Intermediary != null)
     {
         AssetIntermediary = networks.Intermediary;
     }
 }