Ejemplo n.º 1
0
        public void CashConnect()
        {
            Debug.DebugHelper.Run(() => { Debug.DebugHelper.Log(String.Format("{0} started", MethodInfo.GetCurrentMethod().GetFullName())); });

            CashAppContext.Logon();

            Debug.DebugHelper.Run(() => { Debug.DebugHelper.Log(String.Format("{0} end", MethodInfo.GetCurrentMethod().GetFullName())); });
        }
Ejemplo n.º 2
0
        public void CashConnectOrDisconnect()
        {
            Debug.DebugHelper.Run(() => { Debug.DebugHelper.Log(String.Format("{0} started", MethodInfo.GetCurrentMethod().GetFullName())); });

            if (CanLogout(CashAppContext))
            {
                CashAppContext.Logout();
            }
            else if (CanLogon(CashAppContext))
            {
                CashAppContext.Logon();
            }

            Debug.DebugHelper.Run(() => { Debug.DebugHelper.Log(String.Format("{0} end", MethodInfo.GetCurrentMethod().GetFullName())); });
        }
Ejemplo n.º 3
0
        public void Connect()
        {
            Debug.DebugHelper.Run(() => { Debug.DebugHelper.Log(String.Format("{0} started", MethodInfo.GetCurrentMethod().GetFullName())); });

            Task.Factory.StartNew(() =>
            {
                //bool state = false;
                try
                {
                    if (CurrentUser.Instance.User != null)
                    {
                        if (CurrentUser.Instance.User.AutoConnectToCash && CashAppContext != null)
                        {
                            CashAppContext.Logon();
                        }
                    }
                }
                catch (Exception ex)
                {
                    TBYException tex = new TBYAppContextFIXConnectException("5029", MethodBase.GetCurrentMethod().GetFullName(), "Hisse FIX bağlantısı kurulurken hata oluştu", ex);
                    Exception(tex);
                }
            });

            Task.Factory.StartNew(() =>
            {
                //bool state = false;
                try
                {
                    if (CurrentUser.Instance.User != null)
                    {
                        if (CurrentUser.Instance.User.AutoConnectToFuture && VIOPAppContext != null)
                        {
                            VIOPAppContext.Logon();
                        }
                    }
                }
                catch (Exception ex)
                {
                    TBYException tex = new TBYAppContextFIXConnectException("5029", MethodBase.GetCurrentMethod().GetFullName(), "VIOP FIX bağlantısı kurulurken hata oluştu", ex);
                    Exception(tex);
                }
            });

            Debug.DebugHelper.Run(() => { Debug.DebugHelper.Log(String.Format("{0} end", MethodInfo.GetCurrentMethod().GetFullName())); });
        }