public BuildConfiguration(ILocalPath outputFolder, ILocalPath distributionLocalFolder, IServerPath distributionServerPath, ILocalPath solutionFile) { this.OutputFolder = outputFolder; this.DistributionLocalPath = distributionLocalFolder; this.DistributionServerPath = distributionServerPath; this.SolutionFile = solutionFile; }
public void DownloadFolderContent(IServerPath serverPath, ILocalPath localPath, ILogger logger) { var items = this.VersionControlServer.GetItems(serverPath.AsString(), VersionSpec.Latest, RecursionType.OneLevel); foreach (var item in items.Items) { if (0 == string.Compare(item.ServerItem, serverPath.AsString(), true)) { continue; } var itemServerPath = new ServerPath(item.ServerItem); var itemLocalPath = localPath.Subpath(itemServerPath.GetName()); if (item.ItemType == ItemType.File) { logger.Info($"Download file {item.ServerItem} to {itemLocalPath.AsString()}"); item.DownloadFile(itemLocalPath.AsString()); } else { DownloadFolderContent(itemServerPath, itemLocalPath, logger); } } }
public ILocalPath ResolveDistributionLocalPath(ILocalPath basePath) { return(basePath.Subpath(Folders.EnginesAndGamesFolder.WellKnownName) .Subpath(_contentProvider.Name) .Subpath(Folders.EngineFolder.WellKnownName) .Subpath(_version.ToString())); }
public void PendAdd(ILocalPath filePath) { if (!_tfsGateway.HasPendingChanges(filePath)) { _tfsGateway.PendAdd(filePath); } _pendingFiles.Add(filePath.AsString()); }
public void PendDelete(ILocalPath path) { var serverPath = _workspace.GetServerItemForLocalItem(path.AsString()); _workspace.Get(new GetRequest(serverPath, RecursionType.Full, VersionSpec.Latest), GetOptions.None); _workspace.PendDelete(path.AsString(), RecursionType.Full); _pendingChanges.Add(path.AsString()); }
public ILocalPath ResolveDistributionLocalPath(ILocalPath basePath) { return(basePath.Subpath(Folders.EnginesAndGamesFolder.WellKnownName) .Subpath(_engineName.ToString()) .Subpath(Folders.GamesFolder.WellKnownName) .Subpath(_gameName) .Subpath(Folders.GameLimitsFolder.WellKnownName) .Subpath(_version.ToString())); }
public void CheckoutForEdit(ILocalPath filePath) { if (!_tfsGateway.HasPendingChanges(filePath)) { _tfsGateway.CheckoutForEdit(filePath); } _pendingFiles.Add(filePath.AsString()); }
public EveryCentDatabase(ILocalPath databasePath) { try { var pathToDatabase = databasePath.GetLocalFilePath("everycent.db3"); _connection = new SQLiteAsyncConnection(pathToDatabase, false); _connection.CreateTableAsync <Movement>().Wait(); } catch (Exception) { } }
private IEnumerable <IVisualStudioProject> ReadVisualStudioProjects(ILocalPath inFolder) { var projects = new List <IVisualStudioProject>(); foreach (var projectInSolution in _solutionFile.ProjectsInOrder.Where(p => p.ProjectType == SolutionProjectType.KnownToBeMSBuildFormat)) { if (!this.SolutionFoldersToIgnore.Contains(projectInSolution.ParentProjectGuid) && projectInSolution.AbsolutePath.StartsWith(inFolder.AsString(), StringComparison.OrdinalIgnoreCase)) { projects.Add(new VisualStudioProject(projectInSolution.AbsolutePath)); } } return(projects); }
private IEnumerable <string> FindReferencedAssemblies(ILocalPath folderContainingAssemblies, IEnumerable <string> allUsedReferences) { var allUsedReferencesDic = allUsedReferences.Distinct().ToDictionary(r => r, StringComparer.OrdinalIgnoreCase); var assemblies = new List <string>(); foreach (var file in Directory.EnumerateFiles(folderContainingAssemblies.AsString(), "*.dll", SearchOption.AllDirectories)) { if (allUsedReferencesDic.ContainsKey(file)) { assemblies.Add(file); } } return(assemblies); }
public void TryGetLatest(ILocalPath localPath) { var workspace = GetWorkspace(); if (!workspace.IsLocalPathMapped(localPath.AsString())) { return; } var serverPath = workspace.GetServerItemForLocalItem(localPath.AsString()); var tfsItem = workspace.VersionControlServer.GetItems(serverPath, RecursionType.None).Items.FirstOrDefault(); if (tfsItem != null) { workspace.GetFullLatest(tfsItem.ServerItem); } }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { try { ILocalPath path = DependencyService.Get <ILocalPath>(); string dbPath = path.DatabasePath(_databasePath); if (string.IsNullOrEmpty(dbPath)) { throw new Exception("ILocalPath.DatabasePath: returned null reference"); } optionsBuilder.UseSqlite($"Filename={dbPath}"); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex); } }
public void WriteFileContent(ILocalPath localPath, byte[] content) { _fileSystemManager.WriteFileContent(localPath.AsString(), content); }
public void WriteAllText(ILocalPath filePath, string fileContent) { _fileSystemManager.WriteAllText(filePath.AsString(), fileContent); }
public string ReadAllText(ILocalPath filePath) { return(_fileSystemManager.ReadAllText(filePath.AsString())); }
public void CopyFile(ILocalPath sourceFile, ILocalPath targetFile) { _fileSystemManager.CopyFile(sourceFile.AsString(), targetFile.AsString()); }
public bool FileExists(ILocalPath fileLocalPath) { return(_fileSystemManager.FileExists(fileLocalPath.AsString())); }
public AssemblyInfoVersionUpdateAction(ILocalPath assemblyInfoFile, VersionNumber version) { _assemblyInfoFile = assemblyInfoFile; _version = version; }
public void PendAdd(ILocalPath filePath) { }
public IServerPath GetServerPathFromLocalPath(ILocalPath localPath) { return(CreateServerPathDescriptor(GetWorkspace().GetServerItemForLocalItem(localPath.AsString()))); }
public ILocalPath ResolveBuildOutputPath(ILocalPath basePath) { return(basePath.Subpath(Folders.GamesFolder.WellKnownName) .Subpath(GameName) .Subpath(FileName)); }
public TfsFile(IServerPath serverPath, ILocalPath localPath, ITfsGateway tfsGateway) { ServerPath = serverPath; LocalPath = localPath; _tfsGateway = tfsGateway; }
public bool HasPendingChanges(ILocalPath filePath) { return(GetWorkspace().GetPendingChanges(filePath.AsString()).Any()); }
public void DeleteFile(ILocalPath targetFile) { _fileSystemManager.DeleteFile(targetFile.AsString()); }
public void TryGetLatestVersion(ILocalPath filePath) { }
public bool HasPendingChanges(ILocalPath targetFile) { return(false); }
public GameOutputFile(string gameName, Folders.GameEngineFolder engineFolder, ILocalPath sourceFile) { GameName = gameName; EngineName = engineFolder.Name; SourceFile = sourceFile; }
public void CheckoutForEdit(ILocalPath localFilePath) { GetWorkspace().PendEdit(localFilePath.AsString()); }
public ILocalPath ResolveDistributionPath(ILocalPath basePath) { return(basePath.Subpath(this.FileName)); }
public void CheckoutForEdit(ILocalPath filePath) { File.SetAttributes(filePath.AsString(), FileAttributes.Normal); }