Added resolution to outbound comm, part 2
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Communications.Resolution;
|
||||
using Swarmops.Utility.Communications;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Swarmops.Backend
|
||||
{
|
||||
@@ -13,11 +15,23 @@ namespace Swarmops.Backend
|
||||
|
||||
foreach (OutboundComm comm in comms)
|
||||
{
|
||||
// TODO: RESOLVE RECIPIENTS
|
||||
|
||||
if (!comm.Resolved)
|
||||
{
|
||||
continue;
|
||||
// Resolve recipients
|
||||
|
||||
ResolverEnvelope resolverEnvelope = ResolverEnvelope.FromXml(comm.ResolverDataXml);
|
||||
|
||||
// Create the resolver via reflection of the static FromXml method
|
||||
|
||||
Assembly assembly = typeof(ResolverEnvelope).Assembly;
|
||||
|
||||
Type payloadType = assembly.GetType(resolverEnvelope.ResolverClass);
|
||||
var methodInfo = payloadType.GetMethod("FromXml", BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
|
||||
|
||||
ICommsResolver resolver = (ICommsResolver)(methodInfo.Invoke(null, new object[] { resolverEnvelope.ResolverDataXml }));
|
||||
resolver.Resolve(comm);
|
||||
|
||||
continue; // continue is not strictly necessary; could continue processing the same OutboundComm after resolution
|
||||
}
|
||||
|
||||
if (comm.TransmitterClass != "Swarmops.Utility.Communications.CommsTransmitterMail")
|
||||
|
||||
+2
-1
@@ -6,7 +6,8 @@ using Mono.Unix;
|
||||
using Mono.Unix.Native;
|
||||
using Swarmops.Database;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Communications.Resolution;
|
||||
using Swarmops.Logic.Financial;
|
||||
using Swarmops.Logic.Structure;
|
||||
using Swarmops.Logic.Support;
|
||||
|
||||
@@ -3,5 +3,11 @@
|
||||
public interface ICommsResolver
|
||||
{
|
||||
string ToXml(); // implemented by PayloadBase
|
||||
|
||||
/// <summary>
|
||||
/// Resolves the recipients for a certain piece of outbound communications.
|
||||
/// </summary>
|
||||
/// <param name="comm">The comm to resolve</param>
|
||||
void Resolve(OutboundComm comm);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Swarm;
|
||||
|
||||
namespace Swarmops.Logic.Communications
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Globalization;
|
||||
using Swarmops.Basic.Types.Communications;
|
||||
using Swarmops.Common.Enums;
|
||||
using Swarmops.Database;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Communications.Resolution;
|
||||
using Swarmops.Logic.Financial;
|
||||
using Swarmops.Logic.Structure;
|
||||
|
||||
+211
-211
@@ -1,212 +1,212 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Net;
|
||||
using Swarmops.Database;
|
||||
using Swarmops.Logic.Resources;
|
||||
using Swarmops.Logic.Support;
|
||||
using Swarmops.Logic.Swarm;
|
||||
|
||||
namespace Swarmops.Logic.Communications.Transmission
|
||||
{
|
||||
[Serializable]
|
||||
public class NotificationPayload : PayloadBase<NotificationPayload>, ICommsRenderer
|
||||
{
|
||||
[Obsolete (
|
||||
"Do not use this direct constructor. It is intended for XML serialization only. Therefore, you're getting a compile-time error.",
|
||||
true)]
|
||||
public NotificationPayload()
|
||||
{
|
||||
// empty ctor, for XML reflection. Do not use.
|
||||
}
|
||||
|
||||
public NotificationPayload (string notificationResource)
|
||||
: this (notificationResource, new NotificationStrings())
|
||||
{
|
||||
// redirect to main ctor
|
||||
}
|
||||
|
||||
public NotificationPayload(string notificationResource, NotificationStrings strings) :
|
||||
this(notificationResource, strings, new NotificationCustomStrings())
|
||||
{
|
||||
// also redirect to main ctor
|
||||
}
|
||||
|
||||
public NotificationPayload(string notificationResource, NotificationCustomStrings customStrings) :
|
||||
this(notificationResource, new NotificationStrings(), customStrings)
|
||||
{
|
||||
// also redirect to main ctor
|
||||
}
|
||||
|
||||
public NotificationPayload(string notificationResource, NotificationStrings strings, NotificationCustomStrings customStrings)
|
||||
{
|
||||
SubjectResource = notificationResource + "_Subject";
|
||||
BodyResource = notificationResource + "_Body";
|
||||
Strings = strings;
|
||||
CustomStrings = customStrings;
|
||||
}
|
||||
|
||||
public string SubjectResource { get; set; }
|
||||
public string BodyResource { get; set; }
|
||||
public NotificationStrings Strings { get; set; }
|
||||
public NotificationCustomStrings CustomStrings { get; set; }
|
||||
|
||||
public string GetSubject(string cultureId)
|
||||
{
|
||||
return
|
||||
ExpandMacros (
|
||||
Logic_Communications_Transmission_NotificationPayload.ResourceManager.GetString (SubjectResource, CultureInfo.CreateSpecificCulture (cultureId)));
|
||||
}
|
||||
|
||||
public string GetBody(string cultureId)
|
||||
{
|
||||
return
|
||||
ExpandMacros (
|
||||
Logic_Communications_Transmission_NotificationPayload.ResourceManager.GetString (BodyResource, CultureInfo.CreateSpecificCulture (cultureId)));
|
||||
}
|
||||
|
||||
public string ExpandMacros (string input)
|
||||
{
|
||||
// Replace a few technical items that would be found in system-level notifications
|
||||
|
||||
input = input.Replace ("[HostName]", Dns.GetHostName());
|
||||
input = input.Replace ("[DbVersion]", SwarmDb.DbVersionExpected.ToString(CultureInfo.InvariantCulture));
|
||||
input = input.Replace ("[SwarmopsVersion]", Formatting.SwarmopsVersion);
|
||||
input = input.Replace ("[InstallationName]", SystemSettings.InstallationName);
|
||||
input = input.Replace ("[ExternalUrl]", SystemSettings.ExternalUrl);
|
||||
|
||||
// Loop through supplied strings and replace them in the resource. Not very efficient but who cares
|
||||
|
||||
if (Strings != null)
|
||||
{
|
||||
foreach (NotificationString notificationString in Strings.Keys)
|
||||
{
|
||||
// TODO: Check if string ends in Float, and if so, parse and culturize it
|
||||
|
||||
input = input.Replace ("[" + notificationString /* this is an enum converted to string */+ "]",
|
||||
Strings[notificationString]);
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomStrings != null)
|
||||
{
|
||||
foreach (string notificationCustomString in CustomStrings.Keys)
|
||||
{
|
||||
input =
|
||||
input.Replace (
|
||||
"[" + notificationCustomString /* this is a System.String as opposed to above */+ "]",
|
||||
CustomStrings[notificationCustomString]);
|
||||
}
|
||||
}
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
#region Implementation of ICommsRenderer
|
||||
|
||||
public RenderedComm RenderComm (Person person)
|
||||
{
|
||||
string culture = person.PreferredCulture;
|
||||
if (string.IsNullOrEmpty (culture))
|
||||
{
|
||||
culture = "en-US";
|
||||
}
|
||||
|
||||
RenderedComm result = new RenderedComm();
|
||||
|
||||
result[CommRenderPart.Subject] = GetSubject(culture);
|
||||
result[CommRenderPart.BodyText] = GetBody(culture);
|
||||
result[CommRenderPart.SenderName] = SystemSettings.AdminNotificationSender; // TODO: Make dependent on an enum
|
||||
result[CommRenderPart.SenderMail] = SystemSettings.AdminNotificationAddress;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
public enum NotificationResource
|
||||
{
|
||||
Unknown = 0,
|
||||
System_Startup,
|
||||
System_Exception,
|
||||
System_DatabaseSchemaUpgraded,
|
||||
System_DatabaseUpgradeFailed,
|
||||
System_MailServerTest,
|
||||
CashAdvance_Requested,
|
||||
CashAdvance_Attested,
|
||||
CashAdvance_Deattested,
|
||||
CashAdvance_Denied,
|
||||
CashAdvance_Adjusted,
|
||||
CashAdvance_Rebudgeted,
|
||||
CashAdvance_PaidOut,
|
||||
ExpenseClaim_Created,
|
||||
ExpenseClaim_Attested,
|
||||
ExpenseClaim_Deattested,
|
||||
ExpenseClaim_Validated,
|
||||
ExpenseClaim_Devalidated,
|
||||
ExpenseClaim_Denied,
|
||||
ExpenseClaim_Adjusted,
|
||||
ExpenseClaim_Rebudgeted,
|
||||
ExpenseClaim_PaidOut,
|
||||
Payout_Settled,
|
||||
InboundInvoice_Created,
|
||||
Receipts_Filed,
|
||||
Password_ResetOnRequest,
|
||||
Password_ResetByCrew,
|
||||
Password_CannotReset2FA,
|
||||
Password_Changed,
|
||||
Participant_Signup,
|
||||
Participant_Volunteer,
|
||||
Participant_Renewed,
|
||||
Participant_Terminated,
|
||||
Participant_Churned,
|
||||
Bitcoin_PaidOut,
|
||||
Bitcoin_Shortage,
|
||||
Bitcoin_Shortage_Urgent,
|
||||
Bitcoin_Shortage_Critical,
|
||||
BitcoinPayoutAddress_Set,
|
||||
BitcoinPayoutAddress_Bad,
|
||||
BitcoinPayoutAddress_PleaseSet,
|
||||
BitcoinPayoutAddress_OfficerNotify,
|
||||
BitcoinPayoutAddress_Changed
|
||||
}
|
||||
|
||||
// ReSharper restore InconsistentNaming
|
||||
|
||||
public enum NotificationString
|
||||
{
|
||||
Unknown = 0,
|
||||
ActingPersonName,
|
||||
BudgetAmountFloat,
|
||||
BudgetName,
|
||||
ConcernedPersonName,
|
||||
CurrencyCode,
|
||||
DateTime,
|
||||
DateTimeExpiry,
|
||||
Description,
|
||||
EmbeddedPreformattedText,
|
||||
OrganizationName,
|
||||
MailAddress,
|
||||
RequestPurpose,
|
||||
TertiaryPersonName,
|
||||
TicketCode,
|
||||
Supplier,
|
||||
GeographyName,
|
||||
RegularTitle,
|
||||
ActivistTitle
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class NotificationStrings : Basic.Types.Common.SerializableDictionary<NotificationString, string>
|
||||
{
|
||||
// typeset
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class NotificationCustomStrings : SerializableDictionary<string, string>
|
||||
{
|
||||
// typeset
|
||||
}
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Net;
|
||||
using Swarmops.Database;
|
||||
using Swarmops.Logic.Resources;
|
||||
using Swarmops.Logic.Support;
|
||||
using Swarmops.Logic.Swarm;
|
||||
|
||||
namespace Swarmops.Logic.Communications.Payload
|
||||
{
|
||||
[Serializable]
|
||||
public class NotificationPayload : PayloadBase<NotificationPayload>, ICommsRenderer
|
||||
{
|
||||
[Obsolete (
|
||||
"Do not use this direct constructor. It is intended for XML serialization only. Therefore, you're getting a compile-time error.",
|
||||
true)]
|
||||
public NotificationPayload()
|
||||
{
|
||||
// empty ctor, for XML reflection. Do not use.
|
||||
}
|
||||
|
||||
public NotificationPayload (string notificationResource)
|
||||
: this (notificationResource, new NotificationStrings())
|
||||
{
|
||||
// redirect to main ctor
|
||||
}
|
||||
|
||||
public NotificationPayload(string notificationResource, NotificationStrings strings) :
|
||||
this(notificationResource, strings, new NotificationCustomStrings())
|
||||
{
|
||||
// also redirect to main ctor
|
||||
}
|
||||
|
||||
public NotificationPayload(string notificationResource, NotificationCustomStrings customStrings) :
|
||||
this(notificationResource, new NotificationStrings(), customStrings)
|
||||
{
|
||||
// also redirect to main ctor
|
||||
}
|
||||
|
||||
public NotificationPayload(string notificationResource, NotificationStrings strings, NotificationCustomStrings customStrings)
|
||||
{
|
||||
SubjectResource = notificationResource + "_Subject";
|
||||
BodyResource = notificationResource + "_Body";
|
||||
Strings = strings;
|
||||
CustomStrings = customStrings;
|
||||
}
|
||||
|
||||
public string SubjectResource { get; set; }
|
||||
public string BodyResource { get; set; }
|
||||
public NotificationStrings Strings { get; set; }
|
||||
public NotificationCustomStrings CustomStrings { get; set; }
|
||||
|
||||
public string GetSubject(string cultureId)
|
||||
{
|
||||
return
|
||||
ExpandMacros (
|
||||
Logic_Communications_Transmission_NotificationPayload.ResourceManager.GetString (SubjectResource, CultureInfo.CreateSpecificCulture (cultureId)));
|
||||
}
|
||||
|
||||
public string GetBody(string cultureId)
|
||||
{
|
||||
return
|
||||
ExpandMacros (
|
||||
Logic_Communications_Transmission_NotificationPayload.ResourceManager.GetString (BodyResource, CultureInfo.CreateSpecificCulture (cultureId)));
|
||||
}
|
||||
|
||||
public string ExpandMacros (string input)
|
||||
{
|
||||
// Replace a few technical items that would be found in system-level notifications
|
||||
|
||||
input = input.Replace ("[HostName]", Dns.GetHostName());
|
||||
input = input.Replace ("[DbVersion]", SwarmDb.DbVersionExpected.ToString(CultureInfo.InvariantCulture));
|
||||
input = input.Replace ("[SwarmopsVersion]", Formatting.SwarmopsVersion);
|
||||
input = input.Replace ("[InstallationName]", SystemSettings.InstallationName);
|
||||
input = input.Replace ("[ExternalUrl]", SystemSettings.ExternalUrl);
|
||||
|
||||
// Loop through supplied strings and replace them in the resource. Not very efficient but who cares
|
||||
|
||||
if (Strings != null)
|
||||
{
|
||||
foreach (NotificationString notificationString in Strings.Keys)
|
||||
{
|
||||
// TODO: Check if string ends in Float, and if so, parse and culturize it
|
||||
|
||||
input = input.Replace ("[" + notificationString /* this is an enum converted to string */+ "]",
|
||||
Strings[notificationString]);
|
||||
}
|
||||
}
|
||||
|
||||
if (CustomStrings != null)
|
||||
{
|
||||
foreach (string notificationCustomString in CustomStrings.Keys)
|
||||
{
|
||||
input =
|
||||
input.Replace (
|
||||
"[" + notificationCustomString /* this is a System.String as opposed to above */+ "]",
|
||||
CustomStrings[notificationCustomString]);
|
||||
}
|
||||
}
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
#region Implementation of ICommsRenderer
|
||||
|
||||
public RenderedComm RenderComm (Person person)
|
||||
{
|
||||
string culture = person.PreferredCulture;
|
||||
if (string.IsNullOrEmpty (culture))
|
||||
{
|
||||
culture = "en-US";
|
||||
}
|
||||
|
||||
RenderedComm result = new RenderedComm();
|
||||
|
||||
result[CommRenderPart.Subject] = GetSubject(culture);
|
||||
result[CommRenderPart.BodyText] = GetBody(culture);
|
||||
result[CommRenderPart.SenderName] = SystemSettings.AdminNotificationSender; // TODO: Make dependent on an enum
|
||||
result[CommRenderPart.SenderMail] = SystemSettings.AdminNotificationAddress;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
public enum NotificationResource
|
||||
{
|
||||
Unknown = 0,
|
||||
System_Startup,
|
||||
System_Exception,
|
||||
System_DatabaseSchemaUpgraded,
|
||||
System_DatabaseUpgradeFailed,
|
||||
System_MailServerTest,
|
||||
CashAdvance_Requested,
|
||||
CashAdvance_Attested,
|
||||
CashAdvance_Deattested,
|
||||
CashAdvance_Denied,
|
||||
CashAdvance_Adjusted,
|
||||
CashAdvance_Rebudgeted,
|
||||
CashAdvance_PaidOut,
|
||||
ExpenseClaim_Created,
|
||||
ExpenseClaim_Attested,
|
||||
ExpenseClaim_Deattested,
|
||||
ExpenseClaim_Validated,
|
||||
ExpenseClaim_Devalidated,
|
||||
ExpenseClaim_Denied,
|
||||
ExpenseClaim_Adjusted,
|
||||
ExpenseClaim_Rebudgeted,
|
||||
ExpenseClaim_PaidOut,
|
||||
Payout_Settled,
|
||||
InboundInvoice_Created,
|
||||
Receipts_Filed,
|
||||
Password_ResetOnRequest,
|
||||
Password_ResetByCrew,
|
||||
Password_CannotReset2FA,
|
||||
Password_Changed,
|
||||
Participant_Signup,
|
||||
Participant_Volunteer,
|
||||
Participant_Renewed,
|
||||
Participant_Terminated,
|
||||
Participant_Churned,
|
||||
Bitcoin_PaidOut,
|
||||
Bitcoin_Shortage,
|
||||
Bitcoin_Shortage_Urgent,
|
||||
Bitcoin_Shortage_Critical,
|
||||
BitcoinPayoutAddress_Set,
|
||||
BitcoinPayoutAddress_Bad,
|
||||
BitcoinPayoutAddress_PleaseSet,
|
||||
BitcoinPayoutAddress_OfficerNotify,
|
||||
BitcoinPayoutAddress_Changed
|
||||
}
|
||||
|
||||
// ReSharper restore InconsistentNaming
|
||||
|
||||
public enum NotificationString
|
||||
{
|
||||
Unknown = 0,
|
||||
ActingPersonName,
|
||||
BudgetAmountFloat,
|
||||
BudgetName,
|
||||
ConcernedPersonName,
|
||||
CurrencyCode,
|
||||
DateTime,
|
||||
DateTimeExpiry,
|
||||
Description,
|
||||
EmbeddedPreformattedText,
|
||||
OrganizationName,
|
||||
MailAddress,
|
||||
RequestPurpose,
|
||||
TertiaryPersonName,
|
||||
TicketCode,
|
||||
Supplier,
|
||||
GeographyName,
|
||||
RegularTitle,
|
||||
ActivistTitle
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class NotificationStrings : Basic.Types.Common.SerializableDictionary<NotificationString, string>
|
||||
{
|
||||
// typeset
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class NotificationCustomStrings : SerializableDictionary<string, string>
|
||||
{
|
||||
// typeset
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -10,7 +10,7 @@ using Swarmops.Logic.Security;
|
||||
using Swarmops.Logic.Swarm;
|
||||
using Swarmops.Logic.Support;
|
||||
|
||||
namespace Swarmops.Logic.Communications.Transmission
|
||||
namespace Swarmops.Logic.Communications.Payload
|
||||
{
|
||||
[Serializable]
|
||||
public class ParticipantMailPayload: PayloadBase<ParticipantMailPayload>, ICommsRenderer
|
||||
+22
-22
@@ -1,23 +1,23 @@
|
||||
using System;
|
||||
using Swarmops.Logic.Support;
|
||||
|
||||
namespace Swarmops.Logic.Communications.Transmission
|
||||
{
|
||||
[Serializable]
|
||||
public class PayloadEnvelope : PayloadBase<PayloadEnvelope>
|
||||
{
|
||||
public PayloadEnvelope()
|
||||
{
|
||||
// default public ctor for serializability
|
||||
}
|
||||
|
||||
public PayloadEnvelope (IXmlPayload payload)
|
||||
{
|
||||
PayloadClass = payload.GetType().ToString();
|
||||
PayloadXml = payload.ToXml();
|
||||
}
|
||||
|
||||
public string PayloadClass { get; set; }
|
||||
public string PayloadXml { get; set; }
|
||||
}
|
||||
using System;
|
||||
using Swarmops.Logic.Support;
|
||||
|
||||
namespace Swarmops.Logic.Communications.Payload
|
||||
{
|
||||
[Serializable]
|
||||
public class PayloadEnvelope : PayloadBase<PayloadEnvelope>
|
||||
{
|
||||
public PayloadEnvelope()
|
||||
{
|
||||
// default public ctor for serializability
|
||||
}
|
||||
|
||||
public PayloadEnvelope (IXmlPayload payload)
|
||||
{
|
||||
PayloadClass = payload.GetType().ToString();
|
||||
PayloadXml = payload.ToXml();
|
||||
}
|
||||
|
||||
public string PayloadClass { get; set; }
|
||||
public string PayloadXml { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Swarmops.Logic.Support;
|
||||
using Swarmops.Logic.Swarm;
|
||||
using Swarmops.Logic.Structure;
|
||||
|
||||
namespace Swarmops.Logic.Communications.Resolution
|
||||
{
|
||||
[Serializable]
|
||||
public class ParticipantResolver: PayloadBase<ParticipantResolver>, ICommsResolver
|
||||
{
|
||||
[Obsolete("The parameterless ctor is provided for serializability and must not be called directly.", true)]
|
||||
public ParticipantResolver()
|
||||
{
|
||||
// Required for serialization. Never call directly.
|
||||
}
|
||||
|
||||
public void Resolve(OutboundComm comm)
|
||||
{
|
||||
Organization organization = Organization.FromIdentity (OrganizationId);
|
||||
Geography geography = Geography.FromIdentity (GeographyId);
|
||||
|
||||
People allParticipants = People.FromOrganizationAndGeography(organization, geography);
|
||||
|
||||
foreach (Person person in allParticipants)
|
||||
{
|
||||
// Todo: Check if still participant? Check if declined correspondence?
|
||||
|
||||
comm.AddRecipient(person);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IncludeSuborganizations { get; set; }
|
||||
public int OrganizationId { get; set; }
|
||||
public int GeographyId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Swarmops.Logic.Support;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
|
||||
|
||||
namespace Swarmops.Logic.Communications.Resolution
|
||||
{
|
||||
@@ -18,11 +18,11 @@ namespace Swarmops.Logic.Communications.Resolution
|
||||
|
||||
public ResolverEnvelope (ICommsResolver resolver)
|
||||
{
|
||||
PayloadClass = resolver.GetType().ToString();
|
||||
PayloadXml = resolver.ToXml();
|
||||
ResolverClass = resolver.GetType().ToString();
|
||||
ResolverDataXml = resolver.ToXml();
|
||||
}
|
||||
|
||||
public string PayloadClass { get; set; }
|
||||
public string PayloadXml { get; set; }
|
||||
public string ResolverClass { get; set; }
|
||||
public string ResolverDataXml { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using Swarmops.Basic.Types.Financial;
|
||||
using Swarmops.Common.Enums;
|
||||
using Swarmops.Database;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Structure;
|
||||
using Swarmops.Logic.Support;
|
||||
using Swarmops.Logic.Support.LogEntries;
|
||||
|
||||
@@ -5,7 +5,7 @@ using Swarmops.Basic.Types.Financial;
|
||||
using Swarmops.Common.Enums;
|
||||
using Swarmops.Database;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Structure;
|
||||
using Swarmops.Logic.Support;
|
||||
using Swarmops.Logic.Support.LogEntries;
|
||||
|
||||
@@ -6,7 +6,7 @@ using Swarmops.Basic.Types.Financial;
|
||||
using Swarmops.Common.Enums;
|
||||
using Swarmops.Database;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Structure;
|
||||
using Swarmops.Logic.Support;
|
||||
using Swarmops.Logic.Support.LogEntries;
|
||||
|
||||
@@ -6,7 +6,7 @@ using Swarmops.Basic.Types.Financial;
|
||||
using Swarmops.Common.Enums;
|
||||
using Swarmops.Database;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Structure;
|
||||
using Swarmops.Logic.Support;
|
||||
using Swarmops.Logic.Support.LogEntries;
|
||||
|
||||
@@ -7,7 +7,7 @@ using Swarmops.Basic.Types;
|
||||
using Swarmops.Basic.Types.Financial;
|
||||
using Swarmops.Database;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Structure;
|
||||
using Swarmops.Logic.Support;
|
||||
using Swarmops.Logic.Swarm;
|
||||
|
||||
+4
-3
@@ -118,6 +118,7 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Communications\Resolution\ParticipantResolver.cs" />
|
||||
<Compile Include="Communications\Resolution\ResolverEnvelope.cs" />
|
||||
<Compile Include="Financial\BitcoinTransactionInput.cs" />
|
||||
<Compile Include="Financial\BitcoinUtility.cs" />
|
||||
@@ -188,9 +189,9 @@
|
||||
<Compile Include="Communications\OutboundCommRecipients.cs" />
|
||||
<Compile Include="Communications\OutboundComms.cs" />
|
||||
<Compile Include="Communications\OutboundCommTransmitException.cs" />
|
||||
<Compile Include="Communications\Transmission\ParticipantMailPayload.cs" />
|
||||
<Compile Include="Communications\Transmission\PayloadEnvelope.cs" />
|
||||
<Compile Include="Communications\Transmission\NotificationPayload.cs" />
|
||||
<Compile Include="Communications\Payload\ParticipantMailPayload.cs" />
|
||||
<Compile Include="Communications\Payload\PayloadEnvelope.cs" />
|
||||
<Compile Include="Communications\Payload\NotificationPayload.cs" />
|
||||
<Compile Include="Support\PayloadBase.cs" />
|
||||
<Compile Include="Financial\BankDataReaders\SEPaymentsBankgiroReader.cs" />
|
||||
<Compile Include="Financial\Currencies.cs" />
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Net;
|
||||
using MySql.Data.MySqlClient;
|
||||
using Swarmops.Database;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Swarm;
|
||||
|
||||
namespace Swarmops.Logic.Support
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using NBitcoin;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Swarm;
|
||||
|
||||
namespace Swarmops.Frontend.Automation
|
||||
|
||||
@@ -188,7 +188,7 @@ namespace Swarmops.Frontend.Pages.v5.Admin
|
||||
SystemSettings.SmtpHost = host;
|
||||
SystemSettings.SmtpPort = port;
|
||||
|
||||
OutboundComm.CreateNotification(Organization.Sandbox, Logic.Communications.Transmission.NotificationResource.System_MailServerTest);
|
||||
OutboundComm.CreateNotification(Organization.Sandbox, Logic.Communications.Payload.NotificationResource.System_MailServerTest);
|
||||
|
||||
result.ResultCode = AjaxTextBox.CodeChanged;
|
||||
result.NewData = FormatSmtpAccessString (user, pass, host, port);
|
||||
|
||||
@@ -14,7 +14,7 @@ using NGeoIP.Client;
|
||||
using Resources;
|
||||
using Swarmops.Common.Enums;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Security;
|
||||
using Swarmops.Logic.Structure;
|
||||
using Swarmops.Logic.Support;
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Web.UI.WebControls;
|
||||
using Resources;
|
||||
using Swarmops.Common.Enums;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Security;
|
||||
using Swarmops.Logic.Structure;
|
||||
using Swarmops.Logic.Support;
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Web.Services;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Support;
|
||||
using Swarmops.Logic.Support.LogEntries;
|
||||
using Swarmops.Logic.Swarm;
|
||||
|
||||
@@ -11,7 +11,7 @@ using System.Web.UI.WebControls;
|
||||
using NBitcoin.BouncyCastle.Asn1.Ocsp;
|
||||
using Swarmops.Interface.Support;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Security;
|
||||
using Swarmops.Logic.Structure;
|
||||
using Swarmops.Logic.Support;
|
||||
@@ -141,7 +141,7 @@ namespace Swarmops.Pages.Security
|
||||
|
||||
return true; // temp
|
||||
|
||||
// do NOT NOT NOT trim password - this is deliberate. Starting/ending pwds in whitespace must be possible
|
||||
// do NOT NOT NOT trim password - this is deliberate. Passwords starting/ending in whitespace must be possible
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Communications.Transmission;
|
||||
using Swarmops.Logic.Communications.Payload;
|
||||
using Swarmops.Logic.Support;
|
||||
using Swarmops.Logic.Swarm;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user