Esempio n. 1
0
        public IEngine GetEngine()
        {
            if (_engine != null)
            {
                return(_engine);
            }

            var conn = System.Environment.GetEnvironmentVariable("WORKFLOW_CACHE_CONNECTION");

            if (string.IsNullOrEmpty(conn))
            {
                Console.WriteLine("Not connected to cache service. Returning a dummy cache");
                _engine = new NoOpEngine();
                return(_engine);
            }

            var channel = new Channel(conn, ChannelCredentials.Insecure);
            var client  = new EngineStepAPI.EngineStepAPIClient(channel);

            _engine = new Engine(client);
            return(_engine);
        }
Esempio n. 2
0
 public Engine(EngineStepAPI.EngineStepAPIClient client)
 {
     _client = client;
 }