コード例 #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);
            }
        }
コード例 #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);
            }
        }
コード例 #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);
                }
            }
        }
コード例 #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);
            }
        }
コード例 #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);
     }
 }
コード例 #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);
        }
コード例 #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);
 }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #11
0
        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);
        }