private static void ConfigureStorages(JabberConfigurationSection jabberSection, XmppServer server)
		{
			foreach (JabberConfigurationElement se in jabberSection.Storages)
			{
				var storage = Activator.CreateInstance(Type.GetType(se.TypeName, true));
				if (storage is IConfigurable) ((IConfigurable)storage).Configure(se.GetProperties());
				server.StorageManager.SetStorage(se.Name, storage);
			}
		}
예제 #2
0
 private static void ConfigureListeners(JabberConfigurationSection jabberSection, XmppServer server)
 {
     foreach (JabberConfigurationElement le in jabberSection.Listeners)
     {
         var listener = (IXmppListener)Activator.CreateInstance(Type.GetType(le.TypeName, true));
         listener.Name = le.Name;
         listener.Configure(le.GetProperties());
         server.AddXmppListener(listener);
     }
 }
		private static void ConfigureListeners(JabberConfigurationSection jabberSection, XmppServer server)
		{
			foreach (JabberConfigurationElement le in jabberSection.Listeners)
			{
				var listener = (IXmppListener)Activator.CreateInstance(Type.GetType(le.TypeName, true));
				listener.Name = le.Name;
				listener.Configure(le.GetProperties());
				server.AddXmppListener(listener);
			}
		}
예제 #4
0
 private static void ConfigureStorages(JabberConfigurationSection jabberSection, XmppServer server)
 {
     foreach (JabberConfigurationElement se in jabberSection.Storages)
     {
         var storage = Activator.CreateInstance(Type.GetType(se.TypeName, true));
         if (storage is IConfigurable)
         {
             ((IConfigurable)storage).Configure(se.GetProperties());
         }
         server.StorageManager.SetStorage(se.Name, storage);
     }
 }
예제 #5
0
 private static void ConfigureServices(JabberConfigurationSection jabberSection, XmppServer server)
 {
     foreach (ServiceConfigurationElement se in jabberSection.Services)
     {
         var service = (IXmppService)Activator.CreateInstance(Type.GetType(se.TypeName, true));
         service.Jid  = new Jid(Stringprep.NamePrep(se.Jid));
         service.Name = se.Name;
         if (!string.IsNullOrEmpty(se.Parent))
         {
             service.ParentService = server.GetXmppService(new Jid(Stringprep.NamePrep(se.Parent)));
         }
         service.Configure(se.GetProperties());
         server.RegisterXmppService(service);
     }
 }
		private static void ConfigureServices(JabberConfigurationSection jabberSection, XmppServer server)
		{
			foreach (ServiceConfigurationElement se in jabberSection.Services)
			{
				var service = (IXmppService)Activator.CreateInstance(Type.GetType(se.TypeName, true));
				service.Jid = new Jid(Stringprep.NamePrep(se.Jid));
				service.Name = se.Name;
				if (!string.IsNullOrEmpty(se.Parent))
				{
					service.ParentService = server.GetXmppService(new Jid(Stringprep.NamePrep(se.Parent)));
				}
				service.Configure(se.GetProperties());
				server.RegisterXmppService(service);
			}
		}