public FileGUIDListBase BuildSectionAny(PBXNativeTargetData target, string path, bool isFolderRef) { string ext = Path.GetExtension(path); var phase = FileTypeUtils.GetFileType(ext, isFolderRef); switch (phase) { case PBXFileType.Framework: foreach (var guid in target.phases) { if (frameworks.HasEntry(guid)) { return(frameworks[guid]); } } break; case PBXFileType.Resource: foreach (var guid in target.phases) { if (resources.HasEntry(guid)) { return(resources[guid]); } } break; case PBXFileType.Source: foreach (var guid in target.phases) { if (sources.HasEntry(guid)) { return(sources[guid]); } } break; case PBXFileType.CopyFile: foreach (var guid in target.phases) { if (copyFiles.HasEntry(guid)) { return(copyFiles[guid]); } } break; } return(null); }
FileGUIDListBase BuildSection(PBXNativeTarget target, string path) { string ext = Path.GetExtension(path); var phase = FileTypeUtils.GetFileType(ext); switch (phase) { case PBXFileType.Framework: foreach (var guid in target.phase) { if (frameworks.entry.ContainsKey(guid)) { return(frameworks.entry[guid]); } } break; case PBXFileType.Resource: foreach (var guid in target.phase) { if (resources.entry.ContainsKey(guid)) { return(resources.entry[guid]); } } break; case PBXFileType.Source: foreach (var guid in target.phase) { if (sources.entry.ContainsKey(guid)) { return(sources.entry[guid]); } } break; case PBXFileType.CopyFile: foreach (var guid in target.phase) { if (copyFiles.entry.ContainsKey(guid)) { return(copyFiles.entry[guid]); } } break; } return(null); }
public FileGUIDListBase BuildSectionAny(PBXNativeTargetData target, string path, bool isFolderRef) { switch (FileTypeUtils.GetFileType(Path.GetExtension(path), isFolderRef)) { case PBXFileType.Framework: foreach (string str2 in (IEnumerable <string>)target.phases) { if (this.frameworks.HasEntry(str2)) { return(this.frameworks[str2]); } } break; case PBXFileType.Source: foreach (string str4 in (IEnumerable <string>)target.phases) { if (this.sources.HasEntry(str4)) { return(this.sources[str4]); } } break; case PBXFileType.Resource: foreach (string str3 in (IEnumerable <string>)target.phases) { if (this.resources.HasEntry(str3)) { return(this.resources[str3]); } } break; case PBXFileType.CopyFile: foreach (string str5 in (IEnumerable <string>)target.phases) { if (this.copyFiles.HasEntry(str5)) { return(this.copyFiles[str5]); } } break; } return(null); }
public FileGUIDListBase BuildSectionAny(PBXNativeTargetData target, string path, bool isFolderRef) { switch (FileTypeUtils.GetFileType(Path.GetExtension(path), isFolderRef)) { case PBXFileType.NotBuildable: return((FileGUIDListBase)null); case PBXFileType.Framework: using (IEnumerator <string> enumerator = ((IEnumerable <string>)target.phases).GetEnumerator()) { while (enumerator.MoveNext()) { string current = enumerator.Current; if (this.frameworks.HasEntry(current)) { return((FileGUIDListBase)this.frameworks[current]); } } break; } case PBXFileType.Source: using (IEnumerator <string> enumerator = ((IEnumerable <string>)target.phases).GetEnumerator()) { while (enumerator.MoveNext()) { string current = enumerator.Current; if (this.sources.HasEntry(current)) { return((FileGUIDListBase)this.sources[current]); } } break; } case PBXFileType.Header: using (IEnumerator <string> enumerator = ((IEnumerable <string>)target.phases).GetEnumerator()) { while (enumerator.MoveNext()) { string current = enumerator.Current; if (this.headers.HasEntry(current)) { return((FileGUIDListBase)this.headers[current]); } } break; } case PBXFileType.Resource: using (IEnumerator <string> enumerator = ((IEnumerable <string>)target.phases).GetEnumerator()) { while (enumerator.MoveNext()) { string current = enumerator.Current; if (this.resources.HasEntry(current)) { return((FileGUIDListBase)this.resources[current]); } } break; } case PBXFileType.CopyFile: using (IEnumerator <string> enumerator = ((IEnumerable <string>)target.phases).GetEnumerator()) { while (enumerator.MoveNext()) { string current = enumerator.Current; if (this.copyFiles.HasEntry(current)) { return((FileGUIDListBase)this.copyFiles[current]); } } break; } case PBXFileType.ShellScript: using (IEnumerator <string> enumerator = ((IEnumerable <string>)target.phases).GetEnumerator()) { while (enumerator.MoveNext()) { string current = enumerator.Current; if (this.shellScripts.HasEntry(current)) { return((FileGUIDListBase)this.shellScripts[current]); } } break; } } throw new Exception(string.Format("The given path {0} does not refer to a file in a known build section", (object)path)); }