// Token: 0x06000004 RID: 4 RVA: 0x00002194 File Offset: 0x00000394
		public static bool EnsureTargetTypesLoaded(string[] assemblyNames, string[] typeNames)
		{
			if (assemblyNames == null)
			{
				throw new ArgumentNullException("assemblyNames");
			}
			if (typeNames == null)
			{
				throw new ArgumentNullException("typeNames");
			}
			if (assemblyNames.Length == 0)
			{
				assemblyNames = CmdletAssemblyHelper.ManagementCmdletAssemblyNames;
			}
			if (assemblyNames.Length == 0)
			{
				throw new ArgumentException("Cannot find any assembly to load types.");
			}
			TaskHelper.LoadExchangeAssemblyAndReferencesFromSpecificPathForAssemblies(ConfigurationContext.Setup.BinPath, assemblyNames);
			foreach (string valueToConvert in typeNames)
			{
				Type type;
				if (!LanguagePrimitives.TryConvertTo<Type>(valueToConvert, out type))
				{
					return false;
				}
			}
			return true;
		}
Example #2
0
 // Token: 0x060006F8 RID: 1784 RVA: 0x00019FA8 File Offset: 0x000181A8
 public static Assembly[] LoadExchangeAssemblyAndReferencesFromSpecificPath(string targetAssemblyName, string binPath)
 {
     return(TaskHelper.LoadExchangeAssemblyAndReferencesFromSpecificPathForAssemblies(binPath, new string[]
     {
         targetAssemblyName
     }));
 }
		// Token: 0x06000007 RID: 7 RVA: 0x00002304 File Offset: 0x00000504
		public static Assembly[] LoadingAllCmdletAssembliesAndReference(string basePath, params string[] additionAssemblyNames)
		{
			if (!Directory.Exists(basePath))
			{
				throw new ArgumentException(string.Format("Base path '{0}' doesn't exist, abort the operation.", basePath ?? "null"), "basePath");
			}
			if (additionAssemblyNames == null || additionAssemblyNames.Length == 0)
			{
				return TaskHelper.LoadExchangeAssemblyAndReferencesFromSpecificPathForAssemblies(basePath, CmdletAssemblyHelper.ManagementCmdletAssemblyNames);
			}
			List<string> list = new List<string>(CmdletAssemblyHelper.ManagementCmdletAssemblyNames);
			list.AddRange(additionAssemblyNames);
			return TaskHelper.LoadExchangeAssemblyAndReferencesFromSpecificPathForAssemblies(basePath, list.ToArray());
		}