public string GetAbsolutePathForFrontendAppRouting(IContractorOptions options) { string relativePath = "src\\app\\app-routing.module.ts"; string absolutePathForDomain = Path.Combine(options.FrontendDestinationFolder, relativePath); return(absolutePathForDomain); }
public string GetAbsolutePathForInMemoryDbContext(IContractorOptions options) { string relativePath = "Persistence.Tests\\InMemoryDbContext.cs"; string absolutePathForDomain = Path.Combine(options.BackendDestinationFolder, relativePath); return(absolutePathForDomain); }
private static void InitializeForce(string currentFolder) { LogoWriter.Write(); IContractorOptions options = ContractorDefaultOptionsFinder.FindDefaultOptions(currentFolder); Initialize(currentFolder, options); }
private static void Initialize(string currentFolder) { LogoWriter.Write(); IContractorOptions options = InitializeOptions(currentFolder); Initialize(currentFolder, options); }
public RelationAdditionOptions(IContractorOptions options) { this.FrontendDestinationFolder = options.FrontendDestinationFolder; this.BackendDestinationFolder = options.BackendDestinationFolder; this.DbDestinationFolder = options.DbDestinationFolder; this.DbProjectName = options.DbProjectName; this.ProjectName = options.ProjectName; }
private static void Initialize(string currentFolder, IContractorOptions options) { options.BackendDestinationFolder = Path.GetRelativePath(currentFolder, options.BackendDestinationFolder); options.DbDestinationFolder = Path.GetRelativePath(currentFolder, options.DbDestinationFolder); options.FrontendDestinationFolder = Path.GetRelativePath(currentFolder, options.FrontendDestinationFolder); string optionsJson = JsonConvert.SerializeObject(options, Formatting.Indented); string optionsPath = Path.Combine(currentFolder, "contractor.json"); File.WriteAllText(optionsPath, optionsJson); System.Console.WriteLine("contractor.json wurde generiert."); System.Console.WriteLine(); }
private static IContractorOptions InitializeOptions(string currentFolder) { IContractorOptions defaultOptions = ContractorDefaultOptionsFinder.FindDefaultOptions(currentFolder); // BackendDestinationFolder System.Console.WriteLine($"Welches Backend-Projekt soll bearbeitet werden? (Empty = {defaultOptions.BackendDestinationFolder})"); var userBackendDestinationFolder = System.Console.ReadLine().Trim(); if (userBackendDestinationFolder.Length > 0) { defaultOptions.BackendDestinationFolder = userBackendDestinationFolder; } // DbDestinationFolder System.Console.WriteLine($"Welches Datenbank-Projekt soll bearbeitet werden? (Empty = {defaultOptions.DbDestinationFolder})"); var userDbDestinationFolder = System.Console.ReadLine().Trim(); if (userDbDestinationFolder.Length > 0) { defaultOptions.DbDestinationFolder = userDbDestinationFolder; } // FrontendDestinationFolder System.Console.WriteLine($"Welches Frontend-Projekt soll bearbeitet werden? (Empty = {defaultOptions.FrontendDestinationFolder})"); var userFrontendDestinationFolder = System.Console.ReadLine().Trim(); if (userFrontendDestinationFolder.Length > 0) { defaultOptions.FrontendDestinationFolder = userFrontendDestinationFolder; } // ProjectName System.Console.WriteLine($"Wie heißt das Backend-Projekt? (Empty = {defaultOptions.ProjectName})"); var userProjectName = System.Console.ReadLine().Trim(); if (userProjectName.Length > 0) { defaultOptions.ProjectName = userProjectName; } // DbProjectName System.Console.WriteLine($"Wie heißt das Datenbank-Projekt? (Empty = {defaultOptions.DbProjectName})"); var userDbProjectName = System.Console.ReadLine().Trim(); if (userDbProjectName.Length > 0) { defaultOptions.DbProjectName = userDbProjectName; } return(defaultOptions); }
public EntityAdditionOptions(IContractorOptions options) : base(options) { }
public PropertyAdditionOptions(IContractorOptions options) : base(options) { }
public RelationSideAdditionOptions(IContractorOptions options) : base(options) { }
public DomainAdditionOptions(IContractorOptions options) : base(options) { }