public static ServiceRegistration FromYAML(string yaml)
        {
            Deserializer serial             = new Deserializer();
            ServiceRegistrationOptions opts = serial.Deserialize <ServiceRegistrationOptions>(new System.IO.StringReader(yaml));

            return(new ServiceRegistration(opts));
        }
 public ServiceRegistration(ServiceRegistrationOptions options)
 {
     URL               = options.url;
     Localpart         = options.sender_localpart;
     ID                = options.id;
     HomeserverToken   = options.hs_token;
     AppServiceToken   = options.as_token;
     NamespacesAliases = options.namespaces.aliases;
     NamespacesUsers   = options.namespaces.users;
     NamespacesRooms   = options.namespaces.rooms;
 }