public static bool Ping(string serviceAddress, string senderId, string password) { using (var adapter = new eHubAdapter(GetConfiguration(serviceAddress), senderId, password)) { return(true); } }
//----------------------------------------------------------------------------------------------------- public static bool Ping(string serviceAddress, string senderId, string password) { using (var adapter = new eHubAdapter(GetConfiguration(serviceAddress), senderId, password)) { return true; } }
public static void SendMessage(string serviceAddress, string messageFilePath, string recipientId, string senderId, string password) { string messageNamespace = GetMessageNamespace(messageFilePath); using (var fileStream = GetFileAsStream(messageFilePath)) { using (var adapter = new eHubAdapter(GetConfiguration(serviceAddress), senderId, password)) { adapter.Outbox.AddMessage( new eHubMessage( Guid.NewGuid(), senderId, recipientId, MessageSchemaType.Xml, GetApplicationCode(messageNamespace), GetSchemaName(messageNamespace), fileStream )); adapter.SendMessages(); } } }
//----------------------------------------------------------------------------------------------------- public static void SendMessage(string serviceAddress, string messageFilePath, string recipientId, string senderId, string password) { string messageNamespace = GetMessageNamespace(messageFilePath); using (var fileStream = GetFileAsStream(messageFilePath)) { using (var adapter = new eHubAdapter(GetConfiguration(serviceAddress), senderId, password)) { adapter.Outbox.AddMessage( new eHubMessage( Guid.NewGuid(), senderId, recipientId, MessageSchemaType.Xml, GetApplicationCode(messageNamespace), GetSchemaName(messageNamespace), fileStream )); adapter.SendMessages(); } } }