private string OnCallMqlMethod(string methodName, IEnumerable <string> parameters) { string str = ""; try { this.ClientMethod = new MethodCallInfo(methodName, parameters); this.ClientCallSemaphore.Set(); this.ServerCallSemaphore.WaitOne(); str = this.ClientMethod.ReturnValue; if (!string.IsNullOrEmpty(this.ClientMethod.ErrorMessage)) { if (this._mqlHandler.MqlError != null) { MqlErrorException mqlErrorException = new MqlErrorException(this.ExpertInfo, this.ClientMethod); this._mqlHandler.MqlError(mqlErrorException); Trace.Write((object)new LogInfo(LogType.MqlError, (Exception)mqlErrorException, "")); } } } catch (Exception ex) { Trace.Write((object)new LogInfo(LogType.Execption, ex, "")); } finally { this.ClientMethod = (MethodCallInfo)null; } return(str); }
public void OnMqlError(MqlErrorException mqlErrorException) { if (this.MqlError != null) { this.MqlError(mqlErrorException); } }
private string OnCallMqlMethod(string methodName, IEnumerable <string> parameters) { string returnValue = ""; try { try { this.ClientMethod = new MethodCallInfo(methodName, parameters); this.ClientCallSemaphore.Set(); this.ServerCallSemaphore.WaitOne(); returnValue = this.ClientMethod.ReturnValue; if (!string.IsNullOrEmpty(this.ClientMethod.ErrorMessage) && this._mqlHandler.MqlError != null) { MqlErrorException mqlErrorException = new MqlErrorException(this.ExpertInfo, this.ClientMethod); this._mqlHandler.MqlError(mqlErrorException); Trace.Write(new TraceInfo(BridgeTraceErrorType.MqlError, mqlErrorException, "")); } } catch (Exception exception1) { Exception exception = exception1; Trace.Write(new TraceInfo(BridgeTraceErrorType.Execption, exception, "")); } } finally { this.ClientMethod = null; } return(returnValue); }
private void OnMqlError(MqlErrorException mqlErrorException) { string err = mqlErrorException.Message.Split(' ')[3].Trim('\''); string[] msg = err.Split(':'); lastError = Convert.ToInt32(msg[0]); }
private void OnMqlError(MqlErrorException mqlErrorException) { int num = this.AccountNumber(); string str = this.Symbol(); MetaTrader4 metaTrader4 = MetaTrader4.For(num, str); metaTrader4.OnMqlError(mqlErrorException); }
public void OnMqlError(MqlErrorException mqlErrorException) { if (this.MqlError == null) { return; } this.MqlError(mqlErrorException); }
private void metaTrader4_MqlError(MqlErrorException mql) { // handler mql error }
private void OnMqlError(MqlErrorException mqlErrorException) { Trace.Write(new TraceInfo(BridgeTraceErrorType.Debug, message: "MQL Error: " + mqlErrorException.Message)); }
private void OnMqlError(MqlErrorException mqlErrorException) { Trace.Write(new LogInfo(LogType.Notifications, message: "MQL Error: " + mqlErrorException.Message)); }
private void OnMqlError(MqlErrorException mqlErrorException) { MetaTrader4.For(QuoterExtensions.AccountNumber(this), QuoterExtensions.Symbol(this)).OnMqlError(mqlErrorException); }