public void GetAdapterMethods()
        {
            if (PredefinedAdapters.Count > 0)
            {
                List <Type> adapters = new List <Type>();
                //Load adapters from test suite assemblies.
                foreach (string DllFileName in TestSuiteAssembly)
                {
                    Assembly assembly = Assembly.LoadFrom(DllFileName);
                    Type[]   types    = assembly.GetTypes();

                    foreach (Type type in types)
                    {
                        if (type.IsInterface)
                        {
                            var interfaces = type.GetInterfaces();
                            //If the interface is not inherited from IAdapter, ignore it.
                            if (interfaces.FirstOrDefault(o => o.FullName == "Microsoft.Protocols.TestTools.IAdapter") == null)
                            {
                                continue;
                            }
                            adapters.Add(type);
                        }
                    }
                }
                foreach (PtfAdapterView adapterView in PredefinedAdapters)
                {
                    var adaptertype = adapters.FirstOrDefault(o => o.Name == adapterView.Name);
                    if (adaptertype != null)
                    {
                        foreach (MethodInfo method in adaptertype.GetMethods())
                        {
                            AdapterMethod m = new AdapterMethod(method);
                            adapterView.Methods.Add(m);
                        }
                    }
                }
            }
        }
        public void GetAdapterMethods()
        {
            if (PredefinedAdapters.Count > 0)
            {
                List<Type> adapters = new List<Type>();
                //Load adapters from test suite assemblies.
                foreach (string DllFileName in TestSuiteAssembly)
                {
                    Assembly assembly = Assembly.LoadFrom(DllFileName);
                    Type[] types = assembly.GetTypes();

                    foreach (Type type in types)
                    {
                        if (type.IsInterface)
                        {
                            var interfaces = type.GetInterfaces();
                            //If the interface is not inherited from IAdapter, ignore it.
                            if (interfaces.FirstOrDefault(o => o.FullName == "Microsoft.Protocols.TestTools.IAdapter") == null) continue;
                            adapters.Add(type);
                        }
                    }
                }
                foreach (PtfAdapterView adapterView in PredefinedAdapters)
                {
                    var adaptertype = adapters.FirstOrDefault(o => o.Name == adapterView.Name);
                    if (adaptertype != null)
                    {
                        foreach (MethodInfo method in adaptertype.GetMethods())
                        {
                            AdapterMethod m = new AdapterMethod(method);
                            adapterView.Methods.Add(m);
                        }
                    }
                }
            }
        }