Esempio n. 1
0
        private void MethodBody(ICallInfo info, string methodName)
        {
            this.PluginHost.LogDebug("Executing method: " + methodName);
            if (this.callBefore)
            {
                this.PluginHost.LogDebug("Creating timer before 'Continue'. method: " + methodName);
                this.CreateTimer(info, methodName);
            }

            if (!this.continueInCallback)
            {
                this.PluginHost.LogDebug("calling 'Continue' from method body . method: " + methodName);
                info.Continue();
            }

            if (this.callAfter)
            {
                this.PluginHost.LogDebug("Creating timer after 'Continue'. method: " + methodName);
                this.CreateTimer(info, methodName);
            }

            if (this.fromHttpCallback)
            {
                this.PluginHost.LogDebug("Http request. method: " + methodName);
                this.DoHttpCall(info, (response, state) =>
                {
                    this.PluginHost.LogDebug("Executing http callback for method:" + methodName);
                    this.CreateTimer(info, methodName);
                });
            }
        }
Esempio n. 2
0
        private void MethodBody(ICallInfo info, string methodName)
        {
            this.logger.Warn("Executing method: " + methodName);

            if (this.callBefore)
            {
                this.logger.Warn("http call before continue method: " + methodName);
                this.DoHttpCall(info, (response, state) =>
                {
                    this.logger.Warn(methodName + " http callback for before continue call");
                    if (this.continueInCallback)
                    {
                        this.logger.Warn("continue from callback for method: " + methodName);
                        info.Continue();
                    }
                    this.BroadcastEvent(123, null);
                });
            }

            if (!this.continueInCallback)
            {
                this.logger.Warn("continue for method: " + methodName);
                info.Continue();
            }

            if (this.callAfter)
            {
                this.logger.Warn("http call before continue method: " + methodName);
                this.DoHttpCall(info, (response, state) =>
                {
                    this.logger.Warn(methodName + " http callback for after continue call");
                    if (this.continueInCallback)
                    {
                        this.logger.Warn("continue from callback for method: " + methodName);
                        info.Continue();
                    }
                    this.BroadcastEvent(123, null);
                });
            }
        }
Esempio n. 3
0
        private void CreateTimer(ICallInfo info, string methodName)
        {
            Action timerCallback = () =>
            {
                this.PluginHost.LogDebug("Executing timer callback for method:" + methodName);
                if (this.continueInCallback)
                {
                    info.Continue();
                }
                this.BroadcastEvent(123, null);
            };

            this.PluginHost.CreateOneTimeTimer(info, timerCallback, 100);
        }
Esempio n. 4
0
 private void TimerCallback(ICallInfo info)
 {
     info.Continue();
 }