public static void GenerateLowLevelExtensions(RestApiSpec model)
 {
     var targetFile = _nestWatcherFolder + @"LowLevelExtensions.Generated.cs";
     var source = _razorMachine.Execute(File.ReadAllText(_viewFolder + @"LowLevelExtensions.Generated.cshtml"), model).ToString();
     File.WriteAllText(targetFile, source);
 }
        public static RestApiSpec GetRestApiSpec()
        {
            var spec = new RestApiSpec
            {
                Commit = CQ.Create(LocalUri("root.html"))[".sha:first"].Text(),
                Endpoints = Directory.GetFiles(_specFolder)
                    .Where(f => Path.GetFileName(f).StartsWith("watcher.") && f.EndsWith(".json"))
                    .Select(f => CreateApiEndpoint(f))
                    .ToDictionary(d => d.Key, d => d.Value)
            };

            return spec;
        }
 public static void GenerateDescriptors(RestApiSpec model)
 {
     var targetFile = _nestWatcherFolder + @"DSL\_Descriptors.Generated.cs";
     var source = _razorMachine.Execute(File.ReadAllText(_viewFolder + @"_Descriptors.Generated.cshtml"), model).ToString();
     File.WriteAllText(targetFile, source);
 }
 public static void GenerateRequestParameters(RestApiSpec model)
 {
     var targetFile = _nestWatcherFolder + @"Domain\RequestParameters\RequestParameters.Generated.cs";
     var source = _razorMachine.Execute(File.ReadAllText(_viewFolder + @"RequestParameters.Generated.cshtml"), model).ToString();
     File.WriteAllText(targetFile, source);
 }