Beispiel #1
0
        private string DiscoverComponentAssembly(DynComponent component)
        {
            string path;

            path = Path.Combine(ProjectDir, component.Ident, component.Ident + ".dll");

            if (VerboseLoad)
            {
                Console.WriteLine("Searching for component file: {0}", path);
            }

            if (File.Exists(path))
            {
                return(path);
            }

            path = Path.Combine(BaseDir, component.Ident, component.Ident + ".dll");

            if (VerboseLoad)
            {
                Console.WriteLine("Searching for component file: {0}", path);
            }

            if (File.Exists(path))
            {
                return(path);
            }

            return(null);
        }
Beispiel #2
0
        public static IComponent GetComponent(DynComponentSet Components, string ComponentType)
        {
            DynComponent comp = Components[ComponentType];

            if (comp != null)
            {
                return(comp.Plugin);
            }
            else
            {
                return(null);
            }
        }
Beispiel #3
0
 /// <summary>
 /// Returns a component by it's name
 /// </summary>
 /// <param name="ComponentType">Component's type</param>
 /// <returns></returns>
 public IComponent GetComponent(string ComponentType)
 {
     return(DynComponent.GetComponent(ParentSet.Components, ComponentType));
 }