private static GVFSService CreateService(JsonTracer tracer, string[] args) { string serviceName = args.FirstOrDefault(arg => arg.StartsWith(GVFSService.ServiceNameArgPrefix, StringComparison.OrdinalIgnoreCase)); if (serviceName != null) { serviceName = serviceName.Substring(GVFSService.ServiceNameArgPrefix.Length); } else { serviceName = GVFSConstants.Service.ServiceName; } GVFSPlatform gvfsPlatform = GVFSPlatform.Instance; string logFilePath = Path.Combine( gvfsPlatform.GetDataRootForGVFSComponent(serviceName), GVFSConstants.Service.LogDirectory); Directory.CreateDirectory(logFilePath); tracer.AddLogFileEventListener( GVFSEnlistment.GetNewGVFSLogFileName(logFilePath, GVFSConstants.LogFileTypes.Service), EventLevel.Informational, Keywords.Any); string serviceDataLocation = gvfsPlatform.GetDataRootForGVFSComponent(serviceName); RepoRegistry repoRegistry = new RepoRegistry( tracer, new PhysicalFileSystem(), serviceDataLocation, new GVFSMountProcess(tracer)); return(new GVFSService(tracer, serviceName, repoRegistry)); }
private GVFSEnlistment CreateEnlistment(string enlistmentRootPath) { GVFSPlatform.Register(new WindowsPlatform()); string gitBinPath = GVFSPlatform.Instance.GitInstallation.GetInstalledGitBinPath(); string hooksPath = ProcessHelper.WhereDirectory(GVFSConstants.GVFSHooksExecutableName); return(GVFSEnlistment.CreateFromDirectory(enlistmentRootPath, gitBinPath, hooksPath)); }
public static void Initialize() { GVFSPlatform.Register(new WindowsPlatform()); }
public static void Initialize() { GVFSPlatform.Register(new LinuxPlatform()); }
public void SetUp() { GVFSPlatform.Register(new MockPlatform()); }
public static void Initialize() { GVFSPlatform.Register(new MacPlatform()); return; }