public AzureService StartAzureEmulatorProcess(string rootPath) { string standardOutput; string standardError; StringBuilder message = new StringBuilder(); AzureService service = new AzureService(rootPath ,null); if (Directory.Exists(service.Paths.LocalPackage)) { WriteVerbose(Resources.StopEmulatorMessage); service.StopEmulator(out standardOutput, out standardError); WriteVerbose(Resources.StoppedEmulatorMessage); WriteVerbose(string.Format(Resources.RemovePackage, service.Paths.LocalPackage)); Directory.Delete(service.Paths.LocalPackage, true); } WriteVerbose(string.Format(Resources.CreatingPackageMessage, "local")); service.CreatePackage(DevEnv.Local, out standardOutput, out standardError); WriteVerbose(Resources.StartingEmulator); service.StartEmulator(Launch.ToBool(), out standardOutput, out standardError); WriteVerbose(standardOutput); WriteVerbose(Resources.StartedEmulator); SafeWriteOutputPSObject( service.GetType().FullName, Parameters.ServiceName, service.ServiceName, Parameters.RootPath, service.Paths.RootPath); return service; }
internal AzureService NewAzureServiceProcess(string parentDirectory, string serviceName) { // Create scaffolding structure // AzureService newService = new AzureService(parentDirectory, serviceName, null); SafeWriteOutputPSObject( newService.GetType().FullName, Parameters.ServiceName, newService.ServiceName, Parameters.RootPath, newService.Paths.RootPath ); WriteVerbose(string.Format(Resources.NewServiceCreatedMessage, newService.Paths.RootPath)); return newService; }