#pragma warning restore 414 public object Execute(string platformType, string testAssembly, string initializeAssembly = null) { try { if (Platform.Instance == null) { var plat = Activator.CreateInstance(Type.GetType(platformType)) as Platform; Platform.Initialize(plat); if (!string.IsNullOrEmpty(initializeAssembly)) { plat.LoadAssembly(initializeAssembly); } new Application().Attach(); } var asm = Assembly.Load(testAssembly); var type = CodeInterfaceBuilder.FindControlType(asm); if (type != null) { var control = CodeInterfaceBuilder.InstantiateControl(type); if (control != null) { controlHolder = control; return(control.ToContract()); } } } catch (Exception ex) { throw new Exception(ex.ToString()); } return(null); }
public CodeInterfaceBuilder DefineInterface(string name, Interval span, Interval seek) { var builder = new CodeInterfaceBuilder(this, name, span, seek); Children.Add(builder); return builder; }