private void GenerateProxyFile(Configuration config)
 {
     var csFilePath = Path.Combine(Root, config.Name) + ".cs";
     var generator = new CSharpGenerator(config);
     var source = generator.Generate();
     File.WriteAllText(csFilePath, source);
 }
        public bool Execute()
        {
            try
            {
                config = Configuration.Load(Root);

                if (config.GenerateOnBuild)
                {
                    var generator = new CSharpGenerator(config);
                    var source = generator.Generate();
                    File.WriteAllText(Filename, source);
                    File.WriteAllText(Configuration.CacheFile, source);

                }
            }
            catch (ConnectionException)
            {
                tryReadFromCache();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return true;
        }