public static List <GenericFileInfo> GetFilesIncludedInBuild(this PBXProject proj) { var target = proj.GetBuildTargetData(); if (target == null) { return(null); } List <GenericFileInfo> fileInfos = new List <GenericFileInfo>(); foreach (var phase in target.phases) { var sources = proj.sources[phase]; if (sources != null) { foreach (var file in sources.files) { var fileInfo = proj.GetFileInfoFromGUID(file); if (fileInfo != null) { GenericFileInfo fi = new GenericFileInfo(); fi.Name = fileInfo.name; fi.Path = fileInfo.path; fi.GUID = file; fileInfos.Add(fi); } } } } return(fileInfos); }
public void CreateInstance() { Test(resolver => { const string extension = "Test"; var anyFileInfo = new GenericFileInfo(extension); Assert.AreEqual(string.Empty, anyFileInfo.DefaultFileName); Assert.AreEqual(string.Empty, anyFileInfo.Description); Assert.AreEqual(extension, anyFileInfo.Extension); }); }