internal static string GetExtensionVersion(string target) { if (!string.IsNullOrEmpty(target)) { IEnumerator <IPlatformSupportModule> enumerator = platformSupportModules.GetEnumerator(); try { while (enumerator.MoveNext()) { IPlatformSupportModule current = enumerator.Current; if (current.TargetName == target) { return(current.ExtensionVersion); } } } finally { if (enumerator == null) { } enumerator.Dispose(); } } return(null); }
private static IScriptingImplementations GetScriptingImplementations(string target) { if (!string.IsNullOrEmpty(target)) { IEnumerator <IPlatformSupportModule> enumerator = platformSupportModules.GetEnumerator(); try { while (enumerator.MoveNext()) { IPlatformSupportModule current = enumerator.Current; if (current.TargetName == target) { return(current.CreateScriptingImplementations()); } } } finally { if (enumerator == null) { } enumerator.Dispose(); } } return(null); }
internal static IBuildPostprocessor GetBuildPostProcessor(string target) { if (target != null) { IEnumerator <IPlatformSupportModule> enumerator = platformSupportModules.GetEnumerator(); try { while (enumerator.MoveNext()) { IPlatformSupportModule current = enumerator.Current; if (current.TargetName == target) { return(current.CreateBuildPostprocessor()); } } } finally { if (enumerator == null) { } enumerator.Dispose(); } } return(null); }
private static void ChangeActivePlatformModuleTo(string target) { DeactivateActivePlatformModule(); IEnumerator <IPlatformSupportModule> enumerator = platformSupportModules.GetEnumerator(); try { while (enumerator.MoveNext()) { IPlatformSupportModule current = enumerator.Current; if (current.TargetName == target) { s_ActivePlatformModule = current; current.OnActivate(); return; } } } finally { if (enumerator == null) { } enumerator.Dispose(); } }
internal static IUserAssembliesValidator GetUserAssembliesValidator(string target) { if (target != null) { IEnumerator <IPlatformSupportModule> enumerator = platformSupportModules.GetEnumerator(); try { while (enumerator.MoveNext()) { IPlatformSupportModule current = enumerator.Current; if (current.TargetName == target) { return(current.CreateUserAssembliesValidatorExtension()); } } } finally { if (enumerator == null) { } enumerator.Dispose(); } } return(null); }
private static void DeactivateActivePlatformModule() { if (ModuleManager.s_ActivePlatformModule != null) { ModuleManager.s_ActivePlatformModule.OnDeactivate(); ModuleManager.s_ActivePlatformModule = null; } }
static void DeactivateActivePlatformModule() { if (s_ActivePlatformModule != null) { s_ActivePlatformModule.OnDeactivate(); s_ActivePlatformModule = null; } }
private static void DeactivateActivePlatformModule() { if (ModuleManager.s_ActivePlatformModule == null) { return; } ModuleManager.s_ActivePlatformModule.OnDeactivate(); ModuleManager.s_ActivePlatformModule = (IPlatformSupportModule)null; }
static void ChangeActivePlatformModuleTo(string target) { DeactivateActivePlatformModule(); IPlatformSupportModule selected; if (platformSupportModules.TryGetValue(target, out selected)) { s_ActivePlatformModule = selected; s_ActivePlatformModule.OnActivate(); } }
private static void ChangeActivePlatformModuleTo(string target) { ModuleManager.DeactivateActivePlatformModule(); foreach (IPlatformSupportModule current in ModuleManager.platformSupportModules) { if (current.TargetName == target) { ModuleManager.s_ActivePlatformModule = current; current.OnActivate(); break; } } }
internal static IDevice GetDevice(string deviceId) { DevDevice devDevice; if (!DevDeviceList.FindDevice(deviceId, out devDevice)) { throw new ApplicationException("Couldn't create device API for device: " + deviceId); } IPlatformSupportModule platformSupportModule = ModuleManager.FindPlatformSupportModule(devDevice.module); if (platformSupportModule != null) { return(platformSupportModule.CreateDevice(deviceId)); } throw new ApplicationException("Couldn't find module for target: " + devDevice.module); }
static void ChangeActivePlatformModuleTo(string target) { DeactivateActivePlatformModule(); foreach (var module in platformSupportModules) { if (module.TargetName == target) { s_ActivePlatformModule = module; module.OnActivate(); return; } } // There are still some unmodularized platforms, so we can't throw yet //throw new ApplicationException("Couldn't find platform module for target: " + target); }
private void FillCompilerOptions(List <string> arguments, out string argsPrefix) { argsPrefix = "/noconfig "; arguments.Add("/nostdlib+"); arguments.Add("/preferreduilang:en-US"); IPlatformSupportModule platformSupportModule = ModuleManager.FindPlatformSupportModule(ModuleManager.GetTargetStringFromBuildTarget(this.BuildTarget)); ICompilationExtension compilationExtension = platformSupportModule.CreateCompilationExtension(); arguments.AddRange(from r in this.GetClassLibraries() select "/reference:\"" + r + "\""); arguments.AddRange(from r in compilationExtension.GetAdditionalAssemblyReferences() select "/reference:\"" + r + "\""); arguments.AddRange(from r in compilationExtension.GetWindowsMetadataReferences() select "/reference:\"" + r + "\""); arguments.AddRange(from d in compilationExtension.GetAdditionalDefines() select "/define:" + d); arguments.AddRange(compilationExtension.GetAdditionalSourceFiles()); }
internal static List <string> GetJamTargets() { List <string> list = new List <string>(); IEnumerator <IPlatformSupportModule> enumerator = platformSupportModules.GetEnumerator(); try { while (enumerator.MoveNext()) { IPlatformSupportModule current = enumerator.Current; list.Add(current.JamTarget); } } finally { if (enumerator == null) { } enumerator.Dispose(); } return(list); }
internal static string[] GetAdditionalReferencesForUserScripts() { List <string> list = new List <string>(); IEnumerator <IPlatformSupportModule> enumerator = ModuleManager.platformSupportModules.GetEnumerator(); try { while (enumerator.MoveNext()) { IPlatformSupportModule current = enumerator.Current; list.AddRange(current.AssemblyReferencesForUserScripts); } } finally { if (enumerator == null) { } enumerator.Dispose(); } return(list.ToArray()); }
internal static ICompilationExtension GetCompilationExtension(string target) { IEnumerator <IPlatformSupportModule> enumerator = platformSupportModules.GetEnumerator(); try { while (enumerator.MoveNext()) { IPlatformSupportModule current = enumerator.Current; if (current.TargetName == target) { return(current.CreateCompilationExtension()); } } } finally { if (enumerator == null) { } enumerator.Dispose(); } return(new DefaultCompilationExtension()); }
private static IPlatformSupportModule FindPlatformSupportModule(string moduleName) { IEnumerator <IPlatformSupportModule> enumerator = platformSupportModules.GetEnumerator(); try { while (enumerator.MoveNext()) { IPlatformSupportModule current = enumerator.Current; if (current.TargetName == moduleName) { return(current); } } } finally { if (enumerator == null) { } enumerator.Dispose(); } return(null); }