Exemplo n.º 1
0
 //Create server.properties file
 public async Task CreateProperites(Server server)
 {
     using (FileStream stream = new FileStream(Config.Path + "/" + server.Name + "/server.properties", FileMode.Create, FileAccess.ReadWrite)) {
         using (StreamWriter writer = new StreamWriter(stream)) {
             foreach (string key in server.Properties.Keys)
             {
                 await writer.WriteAsync(ModelSerializer.ToPropertiesString(key, server.Properties[key]) + Environment.NewLine);
             }
         }
     }
 }