/// <summary> /// The get test suites file from assembly. /// </summary> /// <param name="loadingAssemblyName"> /// The assembly path. /// </param> /// <returns> /// The <see cref="string"/>. /// </returns> public static EhResourceCollection GetTestSuitesFileFromAssembly(string loadingAssemblyName) { var seperateAppDomainAssemblyLoader = new AppDomainAssemblyLoader(); var tempFile = Path.GetTempFileName(); EhResourceCollection resourceCollection; try { var resultList = seperateAppDomainAssemblyLoader.LoadAssemblyXmlResources(new FileInfo(loadingAssemblyName)); resultList.Save(tempFile); resourceCollection = new EhResourceCollection(); resourceCollection.Load(tempFile); } finally { seperateAppDomainAssemblyLoader.UnloadAppDomain(); } return(resourceCollection); }
/// <summary> /// The get test script methods from assembly. /// </summary> /// <param name="assemblyPath"> /// The assembly path. /// </param> /// <returns> /// The <see cref="EhMethodInfoCollection"/>. /// </returns> public static EhMethodInfoCollection GetTestScriptMethodsFromAssembly(string assemblyPath) { var seperateAppDomainAssemblyLoader = new AppDomainAssemblyLoader(); var tempFile = Path.GetTempFileName(); EhMethodInfoCollection methodInfo; try { var tempMethodFile = seperateAppDomainAssemblyLoader.GetTestScriptInformationMethodsInfo(new FileInfo(assemblyPath)); tempMethodFile.Save(tempFile); methodInfo = new EhMethodInfoCollection(); methodInfo.Load(tempFile); } finally { File.Delete(tempFile); seperateAppDomainAssemblyLoader.UnloadAppDomain(); } return(methodInfo); }