Exemplo n.º 1
0
        ProjectFile CreateFileProjectItem(string path)
        {
            //TODO custom tool?
            string fullPath    = GetFullPath(path);
            string buildAction = project.GetDefaultBuildAction(fullPath);

            return(new ProjectFile(fullPath)
            {
                BuildAction = buildAction
            });
        }
        public Task AddFileToProjectAsync(string filePath)
        {
            if (project.IsFileInProject(filePath))
            {
                return(Task.CompletedTask);
            }

            return(Runtime.RunInMainThread(async() => {
                var fullPath = GetFullPath(filePath);
                string buildAction = project.GetDefaultBuildAction(fullPath);
                var fileItem = new ProjectFile(fullPath)
                {
                    BuildAction = buildAction
                };
                project.AddFile(fileItem);
                await SaveProject();
            }));
        }
Exemplo n.º 3
0
 public string GetDefaultBuildAction(string fileName)
 {
     return(project.GetDefaultBuildAction(fileName));
 }