public void Initiate()
    {
      if (m_disps != null) return;

      m_disps = SwapCurveDefinitions.AllCarbonCurvesNames().Select(x =>
      {
        var liveCurve = new LiveCurve(x);
        m_curves.Add(x, liveCurve);

        return GetClient().SubscribeToLiveInterestCurve(x, liveCurve);
      }).ToArray();
    }
    // initiate the live curve on specific env and also connecting it to the update observable stream
    public void Initiate(string env)
    {
        if (m_disps != null) return;

        m_disps = SwapCurveDefinitions.AllCarbonCurvesNames().Select(x =>
        {
            var liveCurve = new LiveCurve(x);
            m_curves.Add(x, liveCurve);

            liveCurve.LiveCurveUpdateEvent += LiveCurveOnFinishedUpdating;
            return GetClient(env).SubscribeToLiveInterestCurve(x, liveCurve);
        }).ToArray();
    }
示例#3
0
 private void ProcessMethod(LiveCurve curve)
 {
     Console.WriteLine("live update curve {0} on Thread {1}", curve.CarbonCurveName, Thread.CurrentThread.ManagedThreadId);
 }