Exemplo n.º 1
0
        public string[] GetNamesOfInterface(string[] preparedFilesNames, string pathToDirectory)
        {
            var result = new List <string>();

            foreach (var currFileName in preparedFilesNames)
            {
                try
                {
                    Type myType = dllAssembly.GetType(currFileName, true, true);
                    result.Add(myType.Name);
                    ClassNameClassPath.Add(myType.Name, currFileName);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message + "\n" + e.StackTrace);
                }
            }

            return(result.ToArray());
        }
Exemplo n.º 2
0
        public string[] GetNamesOfInterface(string[] preparedFilesNames)
        {
            var result = new List <string>();

            foreach (var currFileName in preparedFilesNames)
            {
                try
                {
                    Type myType = Type.GetType(currFileName, true, true);
                    if (myType.GetInterface(InterfaceName) != null && !myType.IsAbstract && !myType.IsInterface)
                    {
                        result.Add(myType.Name);
                        ClassNameClassPath.Add(myType.Name, currFileName);
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message + "\n" + e.StackTrace);
                }
            }

            return(result.ToArray());
        }