Esempio n. 1
0
        public string RequestAssembly(string assembly)
        {
            if (m_knownAssemblies.Add(assembly))
            {
                if (PlatformStructure != null)
                {
                    string assemblyPath = PlatformStructure.RequestAssembly(assembly);
                    if (assemblyPath != null)
                    {
                        return(assemblyPath);
                    }
                }
                if (MixedStructure != null)
                {
                    string assemblyPath = MixedStructure.RequestAssembly(assembly);
                    if (assemblyPath != null)
                    {
                        return(assemblyPath);
                    }
                }

                Logger.Log(LogType.Warning, LogCategory.Import, $"Assembly '{assembly}' hasn't been found");
                return(null);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
        public bool RequestAssembly(string assembly)
        {
            if (m_knownAssemblies.Add(assembly))
            {
                if (PlatformStructure != null)
                {
                    if (PlatformStructure.RequestAssembly(assembly))
                    {
                        return(true);
                    }
                }
                if (MixedStructure != null)
                {
                    if (MixedStructure.RequestAssembly(assembly))
                    {
                        return(true);
                    }
                }

                Logger.Instance.Log(LogType.Warning, LogCategory.Import, $"Assembly '{assembly}' hasn't been found");
                return(false);
            }
            else
            {
                return(true);
            }
        }
Esempio n. 3
0
        public void Load(IEnumerable <string> pathes)
        {
            List <string> toProcess = new List <string>();

            toProcess.AddRange(pathes);
            if (CheckPC(toProcess))
            {
            }
            else if (CheckAndroid(toProcess))
            {
            }
            CheckMixed(toProcess);

            if (PlatformStructure != null)
            {
                foreach (string filePath in PlatformStructure.FetchFiles())
                {
                    string fileName = FileMultiStream.GetFileName(filePath);
                    if (m_knownFiles.Add(fileName))
                    {
                        FileCollection.Load(filePath);
                    }
                }
            }
            foreach (string filePath in MixedStructure.FetchFiles())
            {
                string fileName = FileMultiStream.GetFileName(filePath);
                if (m_knownFiles.Add(fileName))
                {
                    FileCollection.Load(filePath);
                }
            }
        }
Esempio n. 4
0
        public bool RequestDependency(string dependency)
        {
            if (m_knownFiles.Add(dependency))
            {
                if (PlatformStructure != null)
                {
                    if (PlatformStructure.RequestDependency(dependency))
                    {
                        return(true);
                    }
                }
                if (MixedStructure != null)
                {
                    if (MixedStructure.RequestDependency(dependency))
                    {
                        return(true);
                    }
                }

                Logger.Instance.Log(LogType.Warning, LogCategory.Import, $"Dependency '{dependency}' hasn't been found");
                return(false);
            }
            else
            {
                return(true);
            }
        }
Esempio n. 5
0
 public IEnumerable <string> FetchAssemblies()
 {
     if (PlatformStructure != null)
     {
         foreach (string assemblyPath in PlatformStructure.FetchAssemblies())
         {
             yield return(assemblyPath);
         }
     }
     foreach (string assemblyPath in MixedStructure.FetchAssemblies())
     {
         yield return(assemblyPath);
     }
 }
Esempio n. 6
0
        public bool RequestResource(string resource, out string path)
        {
            if (PlatformStructure != null)
            {
                if (PlatformStructure.RequestResource(resource, out path))
                {
                    return(true);
                }
            }
            if (MixedStructure != null)
            {
                if (MixedStructure.RequestResource(resource, out path))
                {
                    return(true);
                }
            }

            path = null;
            return(false);
        }
Esempio n. 7
0
 private ScriptingBackend GetScriptingBackend()
 {
     if (PlatformStructure != null)
     {
         ScriptingBackend backend = PlatformStructure.GetScriptingBackend();
         if (backend != ScriptingBackend.Unknown)
         {
             return(backend);
         }
     }
     if (MixedStructure != null)
     {
         ScriptingBackend backend = MixedStructure.GetScriptingBackend();
         if (backend != ScriptingBackend.Unknown)
         {
             return(backend);
         }
     }
     return(ScriptingBackend.Unknown);
 }
Esempio n. 8
0
        public string RequestResource(string resource)
        {
            if (PlatformStructure != null)
            {
                string path = PlatformStructure.RequestResource(resource);
                if (path != null)
                {
                    return(path);
                }
            }
            if (MixedStructure != null)
            {
                string path = MixedStructure.RequestResource(resource);
                if (path != null)
                {
                    return(path);
                }
            }

            return(null);
        }
Esempio n. 9
0
        public string RequestDependency(string dependency)
        {
            if (PlatformStructure != null)
            {
                string path = PlatformStructure.RequestDependency(dependency);
                if (path != null)
                {
                    return(path);
                }
            }
            if (MixedStructure != null)
            {
                string path = MixedStructure.RequestDependency(dependency);
                if (path != null)
                {
                    return(path);
                }
            }

            return(null);
        }
Esempio n. 10
0
        public string RequestAssembly(string assembly)
        {
            if (PlatformStructure != null)
            {
                string assemblyPath = PlatformStructure.RequestAssembly(assembly);
                if (assemblyPath != null)
                {
                    return(assemblyPath);
                }
            }
            if (MixedStructure != null)
            {
                string assemblyPath = MixedStructure.RequestAssembly(assembly);
                if (assemblyPath != null)
                {
                    return(assemblyPath);
                }
            }

            return(null);
        }
        public bool RequestAssembly(string assembly)
        {
            string fixedAssembly = FilenameUtils.FixAssemblyName(assembly);

            if (PlatformStructure != null)
            {
                if (PlatformStructure.RequestAssembly(assembly))
                {
                    return(true);
                }
            }
            if (MixedStructure != null)
            {
                if (MixedStructure.RequestAssembly(assembly))
                {
                    return(true);
                }
            }

            Logger.Instance.Log(LogType.Warning, LogCategory.Import, $"Assembly '{assembly}' hasn't been found");
            return(false);
        }