public GroupsServiceRemoteConnector(IConfigSource config) { IConfig groupsConfig = config.Configs["Groups"]; string url = groupsConfig.GetString("GroupsServerURI", string.Empty); if (!Uri.IsWellFormedUriString(url, UriKind.Absolute)) { throw new Exception(string.Format("[Groups.RemoteConnector]: Malformed groups server URL {0}. Fix it or disable the Groups feature.", url)); } m_ServerURI = url; if (!m_ServerURI.EndsWith("/")) { m_ServerURI += "/"; } /// This is from BaseServiceConnector string authType = Util.GetConfigVarFromSections <string>(config, "AuthType", new string[] { "Network", "Groups" }, "None"); switch (authType) { case "BasicHttpAuthentication": m_Auth = new BasicHttpAuthentication(config, "Groups"); break; } /// m_log.DebugFormat("[Groups.RemoteConnector]: Groups server at {0}, authentication {1}", m_ServerURI, (m_Auth == null ? "None" : m_Auth.GetType().ToString())); }
public OfflineIMServiceRemoteConnector(IConfigSource config) { IConfig cnf = config.Configs["Messaging"]; if (cnf == null) { m_log.WarnFormat("[OfflineIM.V2.RemoteConnector]: Missing Messaging configuration"); return; } m_ServerURI = cnf.GetString("OfflineMessageURL", string.Empty); /// This is from BaseServiceConnector string authType = Util.GetConfigVarFromSections <string>(config, "AuthType", new string[] { "Network", "Messaging" }, "None"); switch (authType) { case "BasicHttpAuthentication": m_Auth = new BasicHttpAuthentication(config, "Messaging"); break; } /// m_log.DebugFormat("[OfflineIM.V2.RemoteConnector]: Offline IM server at {0} with auth {1}", m_ServerURI, (m_Auth == null ? "None" : m_Auth.GetType().ToString())); }
public GroupsServiceRemoteConnector(IConfigSource config) { IConfig groupsConfig = config.Configs["Groups"]; string url = groupsConfig.GetString("GroupsServerURI", string.Empty); if (!Uri.IsWellFormedUriString(url, UriKind.Absolute)) throw new Exception(string.Format("[Groups.RemoteConnector]: Malformed groups server URL {0}. Fix it or disable the Groups feature.", url)); m_ServerURI = url; if (!m_ServerURI.EndsWith("/")) m_ServerURI += "/"; /// This is from BaseServiceConnector string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", "Groups" }, "None"); switch (authType) { case "BasicHttpAuthentication": m_Auth = new BasicHttpAuthentication(config, "Groups"); break; } /// m_log.DebugFormat("[Groups.RemoteConnector]: Groups server at {0}, authentication {1}", m_ServerURI, (m_Auth == null ? "None" : m_Auth.GetType().ToString())); }
public OfflineIMServiceRemoteConnector(IConfigSource config) { IConfig cnf = config.Configs["Messaging"]; if (cnf == null) { m_log.WarnFormat("[OfflineIM.V2.RemoteConnector]: Missing Messaging configuration"); return; } m_ServerURI = cnf.GetString("OfflineMessageURL", string.Empty); /// This is from BaseServiceConnector string authType = Util.GetConfigVarFromSections<string>(config, "AuthType", new string[] { "Network", "Messaging" }, "None"); switch (authType) { case "BasicHttpAuthentication": m_Auth = new BasicHttpAuthentication(config, "Messaging"); break; } /// m_log.DebugFormat("[OfflineIM.V2.RemoteConnector]: Offline IM server at {0} with auth {1}", m_ServerURI, (m_Auth == null ? "None" : m_Auth.GetType().ToString())); }