예제 #1
0
            public void LoadAssemblies()
            {
                if (!NeedsReload)
                {
                    return;
                }

                foreach (var dll in properties.dllReferences)
                {
                    LoadAssembly(EncapsulateReferences(modFile.GetFile("lib/" + dll + ".dll")));
                }

                assembly    = LoadAssembly(EncapsulateReferences(modFile.GetMainAssembly()), modFile.GetMainPDB());
                NeedsReload = false;
            }
예제 #2
0
            public void LoadAssemblies()
            {
                if (!NeedsReload)
                {
                    return;
                }

                try
                {
                    modFile.Read(TmodFile.LoadedState.Code);

                    foreach (var dll in properties.dllReferences)
                    {
                        LoadAssembly(EncapsulateReferences(modFile.GetFile("lib/" + dll + ".dll")));
                    }

                    assembly    = LoadAssembly(EncapsulateReferences(modFile.GetMainAssembly()), modFile.GetMainPDB());
                    NeedsReload = false;
                }
                catch (Exception e)
                {
                    e.Data["mod"] = Name;
                    throw;
                }
            }
예제 #3
0
            public void LoadAssemblies()
            {
                if (!NeedsReload)
                {
                    return;
                }

                try
                {
                    using (modFile.EnsureOpen()) {
                        foreach (var dll in properties.dllReferences)
                        {
                            LoadAssembly(EncapsulateReferences(modFile.GetBytes("lib/" + dll + ".dll")));
                        }

                        assembly    = LoadAssembly(EncapsulateReferences(modFile.GetMainAssembly()), modFile.GetMainPDB());
                        NeedsReload = false;
                    }
                }
                catch (Exception e)
                {
                    e.Data["mod"] = Name;
                    throw;
                }
            }