Beispiel #1
0
        public Host(Database database)
        {
            this.Database = database;

            var allowedExits = new Dictionary <string, int>()
            {
                { "HostNotRunning", 10024 },
                { "DatabaseDoesNotExist", 10002 }
            };

            this.StarAdmin = new StarAdmin()
            {
                AllowedExits = allowedExits.Values
            };
        }
Beispiel #2
0
 public void Create()
 {
     StarAdmin.Run($"-d={Name} new db");
 }
Beispiel #3
0
 public void Delete()
 {
     StarAdmin.Run($"-d={Name} delete --force db");
 }
Beispiel #4
0
 public Database(StarAdmin starAdmin, string name)
 {
     this.StarAdmin = starAdmin ?? throw new NullReferenceException(nameof(starAdmin));
     this.Name      = name ?? throw new NullReferenceException(nameof(name));
 }
Beispiel #5
0
 public Server(StarAdmin starAdmin)
 {
     this.StarAdmin = starAdmin;
 }