Skip to content

Commit

Permalink
Rename generated code (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
helto4real committed Dec 25, 2020
1 parent 1276b75 commit 747c7fa
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/DaemonRunner/DaemonRunner/Service/RunnerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private async Task GenerateEntities(NetDaemonHost daemonHost, string sourceFolde
daemonHost.State.Select(n => n.EntityId).Distinct()
);

await File.WriteAllTextAsync(Path.Combine(sourceFolder!, "_EntityExtensions.cs"), source).ConfigureAwait(false);
await File.WriteAllTextAsync(Path.Combine(sourceFolder!, "_EntityExtensions.cs.gen"), source).ConfigureAwait(false);

var services = await daemonHost.GetAllServices();
var sourceRx = codeGen.GenerateCodeRx(
Expand All @@ -227,17 +227,9 @@ private async Task GenerateEntities(NetDaemonHost daemonHost, string sourceFolde
services
);

await File.WriteAllTextAsync(Path.Combine(sourceFolder!, "_EntityExtensionsRx.cs"), sourceRx).ConfigureAwait(false);
await File.WriteAllTextAsync(Path.Combine(sourceFolder!, "_EntityExtensionsRx.cs.gen"), sourceRx).ConfigureAwait(false);
}

// private void EnsureApplicationDirectoryExists(NetDaemonSettings settings)
// {
// settings.SourceFolder ??= Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".netdaemon");
// var appDirectory = Path.Combine(settings.SourceFolder, "apps");

// Directory.CreateDirectory(appDirectory);
// }

private async Task<bool> WaitForDaemonToConnect(NetDaemonHost daemonHost, CancellationToken stoppingToken)
{
var nrOfTimesCheckForConnectedState = 0;
Expand Down

0 comments on commit 747c7fa

Please sign in to comment.