示例#1
0
 public ExtensionManager(ServerContext context)
 {
     _context   = context;
     _config    = context.Config.PackageConfig;
     Assemblies = new AssemblyCatalogue(this);
     Types      = new TypeCatalogue(this);
     Update();
 }
示例#2
0
 public ExtensionManager(ServerContext context)
 {
     Context    = context;
     Config     = Context.Config.PackageConfig;
     Instances  = new ExtensionList(this);
     Assemblies = context.Assemblies;
     Types      = context.Types;
 }
示例#3
0
        public ServerContext(string configPath, IMessenger m)
        {
            configPath = configPath.ResolveSpecial();

            PlatformCurrent = OsInformation.GetPlatform();

            _testing = this; //todo: hack for now.

            if (string.IsNullOrWhiteSpace(configPath))
            {
                throw new ArgumentException($"\'{nameof(configPath)}\' cannot be empty.");
            }

            Assemblies = new AssemblyCatalogue();
            Types      = new TypeCatalogue(Assemblies);

            ConfigDirectoryInfo = new FileInfo(Path.GetFullPath(configPath)).Directory;
            Config = PrimeServerConfig.Get(Path.GetFullPath(configPath));
            M      = m;
            Users  = new Users(this);
            Public = new PublicContext(this);
        }