COmmitting work before lunch
This commit is contained in:
@@ -18,6 +18,12 @@ namespace Swarmops.Basic.Types.Communications
|
||||
this.FailReason = failReason;
|
||||
}
|
||||
|
||||
public BasicOutboundCommRecipient (BasicOutboundCommRecipient original):
|
||||
this (original.OutboundCommRecipientId, original.OutboundCommId, original.PersonId, original.Open, original.Success, original.FailReason)
|
||||
{
|
||||
// copy ctor
|
||||
}
|
||||
|
||||
public int OutboundCommRecipientId { get; private set; }
|
||||
public int OutboundCommId { get; private set; }
|
||||
public int PersonId { get; private set; }
|
||||
|
||||
+1
-6
@@ -51,16 +51,11 @@ namespace Swarmops
|
||||
// PWEvents.CreateEvent(EventSource.PirateBot, EventType.ParleyCancelled, 1, 1, 1, 1, 4, string.Empty);
|
||||
// PWEvents.CreateEvent(EventSource.PirateBot, EventType.ParleyCancelled, 1, 1, 1, 1, 5, string.Empty);
|
||||
|
||||
Utility.BotCode.EventProcessor.Run();
|
||||
// Utility.BotCode.EventProcessor.Run();
|
||||
|
||||
Console.WriteLine(string.Empty);
|
||||
Console.Write("Waiting for mail queue to flush... ");
|
||||
|
||||
while (!MailTransmitter.CanExit)
|
||||
{
|
||||
System.Threading.Thread.Sleep(50);
|
||||
}
|
||||
|
||||
Console.WriteLine("done. Press Enter.");
|
||||
|
||||
Console.ReadLine();
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="database.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,509 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Text;
|
||||
using Swarmops.Basic.Enums;
|
||||
using Swarmops.Basic.Types;
|
||||
using Swarmops.Basic.Types.Communications;
|
||||
|
||||
namespace Swarmops.Database
|
||||
{
|
||||
public partial class SwarmDb
|
||||
{
|
||||
|
||||
#region Database field reading
|
||||
|
||||
private const string outboundCommRecipientFieldSequence =
|
||||
" OutboundCommRecipientId,OutboundCommId,PersonId,Open,Success," + // 0-4
|
||||
"FailReasonId " + // 5
|
||||
"FROM OutboundCommRecipients ";
|
||||
|
||||
private BasicOutboundCommRecipient ReadOutboundCommRecipientFromDataReader(IDataRecord reader) // Not static -- accesses cache, requiring connection strings
|
||||
{
|
||||
int outboundCommRecipientId = reader.GetInt32(0);
|
||||
int outboundCommId = reader.GetInt32(1);
|
||||
int personId = reader.GetInt32(2);
|
||||
bool open = reader.GetBoolean(3);
|
||||
bool success = reader.GetBoolean(4);
|
||||
int failReasonId = reader.GetInt32(5);
|
||||
|
||||
string failReason = GetCachedFailReasonName(failReasonId);
|
||||
|
||||
return new BasicOutboundCommRecipient (outboundCommRecipientId, outboundCommId, personId, open, success, failReason);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Database record reading -- SELECT clauses
|
||||
|
||||
|
||||
public BasicOutboundCommRecipient GetOutboundCommRecipient(int outboundCommRecipientId)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command =
|
||||
GetDbCommand("SELECT" + outboundCommRecipientFieldSequence +
|
||||
"WHERE OutboundCommRecipientId=" + outboundCommRecipientId.ToString(),
|
||||
connection);
|
||||
|
||||
using (DbDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
return ReadOutboundCommRecipientFromDataReader(reader);
|
||||
}
|
||||
|
||||
throw new ArgumentException("No such OutboundCommRecipientId:" + outboundCommRecipientId.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public BasicOutboundCommRecipient[] GetOutboundCommRecipients(params object[] conditions)
|
||||
{
|
||||
List<BasicOutboundCommRecipient> result = new List<BasicOutboundCommRecipient>();
|
||||
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command =
|
||||
GetDbCommand(
|
||||
"SELECT" + outboundCommRecipientFieldSequence + ConstructWhereClause("OutboundCommRecipients", conditions), connection);
|
||||
|
||||
using (DbDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
result.Add(ReadOutboundCommRecipientFromDataReader(reader));
|
||||
}
|
||||
|
||||
return result.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Database optimizations
|
||||
|
||||
private static Dictionary<int, string> _failReasonCache;
|
||||
|
||||
protected string GetCachedFailReasonName(int failReasonId)
|
||||
{
|
||||
if (_failReasonCache == null)
|
||||
{
|
||||
_failReasonCache = new Dictionary<int, string>();
|
||||
_failReasonCache[0] = null; // special case - no error
|
||||
}
|
||||
|
||||
if (_failReasonCache.ContainsKey(failReasonId))
|
||||
{
|
||||
return _failReasonCache[failReasonId];
|
||||
}
|
||||
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command =
|
||||
GetDbCommand("SELECT Name FROM FailReasons WHERE FailReasonId=" + failReasonId.ToString(),
|
||||
connection);
|
||||
|
||||
using (DbDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
_failReasonCache[failReasonId] = reader.GetString(0);
|
||||
return _failReasonCache[failReasonId];
|
||||
}
|
||||
|
||||
throw new ArgumentException("No such FailReasonId:" + failReasonId.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Creation and manipulation -- stored procedures
|
||||
|
||||
|
||||
public int CreateOutboundCommRecipient(int senderPersonId, int fromPersonId, int organizationId, string resolverClass, string recipientDataXml, string transmitterClass, string payloadXml, OutboundCommPriority priority)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("CreateOutboundCommRecipient", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "outboundCommId", senderPersonId);
|
||||
AddParameterWithName(command, "personId", fromPersonId);
|
||||
|
||||
return Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Dead template code
|
||||
|
||||
/*
|
||||
public BasicExpenseClaim GetExpenseClaim(int expenseClaimId)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand(
|
||||
"SELECT ExpenseClaimId,ClaimingPersonId,CreatedDateTime,Open,Attested," +
|
||||
"Validated,Claimed,OrganizationId,GeographyId,BudgetId,BudgetYear," +
|
||||
"ExpenseDate,Description,PreApprovedAmount,Amount,Repaid " +
|
||||
"FROM ExpenseClaims WHERE ExpenseClaimId=" + expenseClaimId.ToString(),
|
||||
connection);
|
||||
|
||||
using (DbDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
return ReadExpenseFromDataReader(reader);
|
||||
}
|
||||
|
||||
throw new ArgumentException("Unknown ExpenseClaim Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BasicExpenseClaim[] GetExpenseClaimsByClaimer(int claimingPersonId)
|
||||
{
|
||||
List<BasicExpenseClaim> result = new List<BasicExpenseClaim>();
|
||||
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command =
|
||||
GetDbCommand("SELECT ExpenseClaimId,ClaimingPersonId,CreatedDateTime,Open,Attested," +
|
||||
"Validated,Claimed,OrganizationId,GeographyId,BudgetId,BudgetYear," +
|
||||
"ExpenseDate,Description,PreApprovedAmount,Amount,Repaid " +
|
||||
"FROM ExpenseClaims WHERE ClaimingPersonId=" + claimingPersonId.ToString(),
|
||||
connection);
|
||||
|
||||
using (DbDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
result.Add(ReadExpenseFromDataReader(reader));
|
||||
}
|
||||
|
||||
return result.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BasicExpenseClaim[] GetExpenseClaimsByBudgetAndYear(int budgetId, int budgetYear)
|
||||
{
|
||||
List<BasicExpenseClaim> result = new List<BasicExpenseClaim>();
|
||||
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command =
|
||||
GetDbCommand("SELECT ExpenseClaimId,ClaimingPersonId,CreatedDateTime,Open,Attested," +
|
||||
"Validated,Claimed,OrganizationId,GeographyId,BudgetId,BudgetYear," +
|
||||
"ExpenseDate,Description,PreApprovedAmount,Amount,Repaid " +
|
||||
"FROM ExpenseClaims WHERE BudgetId=" + budgetId.ToString() + " AND BudgetYear=" + budgetYear.ToString(),
|
||||
connection);
|
||||
|
||||
using (DbDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
result.Add(ReadExpenseFromDataReader(reader));
|
||||
}
|
||||
|
||||
return result.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BasicExpenseClaim[] GetExpenseClaimsByOrganization(int organizationId)
|
||||
{
|
||||
List<BasicExpenseClaim> result = new List<BasicExpenseClaim>();
|
||||
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command =
|
||||
GetDbCommand("SELECT ExpenseClaimId,ClaimingPersonId,CreatedDateTime,Open,Attested," +
|
||||
"Validated,Claimed,OrganizationId,GeographyId,BudgetId,BudgetYear," +
|
||||
"ExpenseDate,Description,PreApprovedAmount,Amount,Repaid " +
|
||||
"FROM ExpenseClaims WHERE OrganizationId=" + organizationId.ToString(),
|
||||
connection);
|
||||
|
||||
using (DbDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
result.Add(ReadExpenseFromDataReader(reader));
|
||||
}
|
||||
|
||||
return result.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private BasicExpenseClaim ReadExpenseFromDataReader(DbDataReader reader)
|
||||
{
|
||||
int expenseClaimId = reader.GetInt32(0);
|
||||
int claimingPersonId = reader.GetInt32(1);
|
||||
DateTime createdDateTime = reader.GetDateTime(2);
|
||||
bool open = reader.GetBoolean(3);
|
||||
bool attested = reader.GetBoolean(4);
|
||||
bool documented = reader.GetBoolean(5);
|
||||
bool claimed = reader.GetBoolean(6);
|
||||
int organizationId = reader.GetInt32(7);
|
||||
int geographyId = reader.GetInt32(8); // obsolete field
|
||||
int budgetId = reader.GetInt32(9);
|
||||
int budgetYear = reader.GetInt32(10);
|
||||
DateTime expenseDate = reader.GetDateTime(11);
|
||||
string description = reader.GetString(12);
|
||||
double preApprovedAmount = reader.GetDouble(13);
|
||||
double amount = reader.GetDouble(14);
|
||||
bool repaid = reader.GetBoolean(15);
|
||||
|
||||
return new BasicExpenseClaim(expenseClaimId, claimingPersonId, createdDateTime,
|
||||
open, attested, documented, claimed, organizationId, geographyId,
|
||||
budgetId, budgetYear, expenseDate, description, preApprovedAmount,
|
||||
amount, repaid);
|
||||
}
|
||||
|
||||
|
||||
public int CreateExpenseClaim(int claimingPersonId, int organizationId, int budgetId, int budgetYear,
|
||||
DateTime expenseDate, string description, double amount)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("CreateExpenseClaim", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "claimingPersonId", claimingPersonId);
|
||||
AddParameterWithName(command, "createdDateTime", DateTime.Now);
|
||||
AddParameterWithName(command, "organizationId", organizationId);
|
||||
AddParameterWithName(command, "budgetId", budgetId);
|
||||
AddParameterWithName(command, "budgetYear", budgetYear);
|
||||
AddParameterWithName(command, "expenseDate", expenseDate);
|
||||
AddParameterWithName(command, "description", description);
|
||||
AddParameterWithName(command, "amount", amount);
|
||||
|
||||
return Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
}
|
||||
|
||||
public int SetExpenseClaimDescription(int expenseClaimId, string description)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("SetExpenseClaimDescription", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "expenseClaimId", expenseClaimId);
|
||||
AddParameterWithName(command, "description", description);
|
||||
|
||||
return Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int SetExpenseClaimBudget(int expenseClaimId, int budgetId)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("SetExpenseClaimBudget", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "expenseClaimId", expenseClaimId);
|
||||
AddParameterWithName(command, "budgetId", budgetId);
|
||||
|
||||
return Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int SetExpenseClaimBudgetYear(int expenseClaimId, int budgetYear)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("SetExpenseClaimBudgetYear", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "expenseClaimId", expenseClaimId);
|
||||
AddParameterWithName(command, "budgetYear", budgetYear);
|
||||
|
||||
return Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int SetExpenseClaimDate(int expenseClaimId, DateTime expenseDate)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("SetExpenseClaimDate", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "expenseClaimId", expenseClaimId);
|
||||
AddParameterWithName(command, "expenseDate", expenseDate);
|
||||
|
||||
return Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int SetExpenseClaimAmount(int expenseClaimId, double amount)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("SetExpenseClaimAmount", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "expenseClaimId", expenseClaimId);
|
||||
AddParameterWithName(command, "amount", amount);
|
||||
|
||||
return Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int SetExpenseClaimAttested(int expenseClaimId, bool attested)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("SetExpenseClaimAttested", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "expenseClaimId", expenseClaimId);
|
||||
AddParameterWithName(command, "attested", attested);
|
||||
|
||||
return Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int SetExpenseClaimValidated(int expenseClaimId, bool validated)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("SetExpenseClaimValidated", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "expenseClaimId", expenseClaimId);
|
||||
AddParameterWithName(command, "validated", validated);
|
||||
|
||||
return Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int SetExpenseClaimOpen(int expenseClaimId, bool open)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("SetExpenseClaimOpen", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "expenseClaimId", expenseClaimId);
|
||||
AddParameterWithName(command, "open", open);
|
||||
|
||||
return Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public int SetExpenseClaimRepaid(int expenseClaimId, bool repaid)
|
||||
{
|
||||
using (DbConnection connection = GetMySqlDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("SetExpenseClaimRepaid", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "expenseClaimId", expenseClaimId);
|
||||
AddParameterWithName(command, "repaid", repaid);
|
||||
|
||||
return Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public int CreateExpenseEvent(int expenseId, ExpenseEventType eventType, int personId)
|
||||
{
|
||||
// WARNING: NOT CONVERTED TO V4 YET
|
||||
|
||||
using (DbConnection connection = GetSqlServerDbConnection())
|
||||
{
|
||||
connection.Open();
|
||||
|
||||
DbCommand command = GetDbCommand("CreateExpenseEvent", connection);
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
AddParameterWithName(command, "expenseId", expenseId);
|
||||
AddParameterWithName(command, "dateTime", DateTime.Now);
|
||||
AddParameterWithName(command, "eventPersonId", personId);
|
||||
AddParameterWithName(command, "eventType", eventType.ToString());
|
||||
|
||||
return Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -92,6 +92,7 @@
|
||||
<Compile Include="Database-OptionalData.cs" />
|
||||
<Compile Include="Database-OrganizationFinancialAccounts.cs" />
|
||||
<Compile Include="Database-Organizations.cs" />
|
||||
<Compile Include="Database-OutboundCommRecipients.cs" />
|
||||
<Compile Include="Database-OutboundComms.cs" />
|
||||
<Compile Include="Database-OutboundInvoices.cs" />
|
||||
<Compile Include="Database-OutboundMailRecipients.cs" />
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Swarmops.Basic.Types.Communications;
|
||||
|
||||
namespace Swarmops.Logic.Communications
|
||||
{
|
||||
public class OutboundComm: BasicOutboundComm
|
||||
{
|
||||
private OutboundComm (BasicOutboundComm basic): base (basic)
|
||||
{
|
||||
// private ctor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Swarmops.Basic.Types.Communications;
|
||||
|
||||
namespace Swarmops.Logic.Communications
|
||||
{
|
||||
public class OutboundCommRecipient: BasicOutboundCommRecipient
|
||||
{
|
||||
private OutboundCommRecipient(BasicOutboundCommRecipient basic): base (basic)
|
||||
{
|
||||
// private ctor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Swarmops.Basic.Types.Communications;
|
||||
using Swarmops.Logic.Support;
|
||||
|
||||
namespace Swarmops.Logic.Communications
|
||||
{
|
||||
public class OutboundCommRecipients: PluralBase<OutboundCommRecipients,OutboundCommRecipient,BasicOutboundCommRecipient>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Swarmops.Basic.Types.Communications;
|
||||
using Swarmops.Logic.Support;
|
||||
|
||||
namespace Swarmops.Logic.Communications
|
||||
{
|
||||
public class OutboundComms: PluralBase<OutboundComms,OutboundComm,BasicOutboundComm>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Resources;
|
||||
using System.Text;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Swarmops.Logic.Communications.Transmission
|
||||
{
|
||||
[Serializable]
|
||||
public class NotificationPayload: PayloadBase<NotificationPayload>
|
||||
{
|
||||
public NotificationPayload()
|
||||
{
|
||||
// empty ctor, for XML reflection
|
||||
}
|
||||
|
||||
public NotificationPayload (string notificationResource)
|
||||
{
|
||||
this.SubjectResource = "Notifications_" + notificationResource + "_Subject";
|
||||
this.BodyResource = "Notifications_" + notificationResource + "_Body";
|
||||
}
|
||||
|
||||
public string SubjectResource { get; set; }
|
||||
public string BodyResource { get; set; }
|
||||
|
||||
public string GetSubject()
|
||||
{
|
||||
ResourceManager resourceManager = new System.Resources.ResourceManager("Swarmops.Logic.Localizations",
|
||||
System.Reflection.Assembly.
|
||||
GetExecutingAssembly());
|
||||
// TODO: Pick culture
|
||||
// TODO: Expand macros
|
||||
|
||||
return resourceManager.GetString(this.SubjectResource);
|
||||
}
|
||||
|
||||
public string GetBody()
|
||||
{
|
||||
ResourceManager resourceManager = new System.Resources.ResourceManager("Swarmops.Logic.Localizations",
|
||||
System.Reflection.Assembly.
|
||||
GetExecutingAssembly());
|
||||
// TODO: Pick culture
|
||||
// TODO: Expand macros
|
||||
|
||||
return resourceManager.GetString(this.BodyResource);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Swarmops.Logic.Communications.Transmission
|
||||
{
|
||||
[Serializable]
|
||||
public class PayloadBase<T>
|
||||
{
|
||||
public string ToXml()
|
||||
{
|
||||
var serializer = new XmlSerializer(typeof(T));
|
||||
|
||||
var stream = new MemoryStream();
|
||||
serializer.Serialize(stream, this);
|
||||
|
||||
byte[] xmlBytes = stream.GetBuffer();
|
||||
return Encoding.Default.GetString(xmlBytes);
|
||||
}
|
||||
|
||||
static T FromXml (string xml)
|
||||
{
|
||||
var serializer = new XmlSerializer(typeof(T));
|
||||
|
||||
var stream = new MemoryStream();
|
||||
byte[] xmlBytes = Encoding.Default.GetBytes(xml);
|
||||
stream.Write(xmlBytes, 0, xmlBytes.Length);
|
||||
|
||||
stream.Position = 0;
|
||||
var result = (T)serializer.Deserialize(stream);
|
||||
stream.Close();
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,6 +64,12 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Communications\OutboundComm.cs" />
|
||||
<Compile Include="Communications\OutboundCommRecipient.cs" />
|
||||
<Compile Include="Communications\OutboundCommRecipients.cs" />
|
||||
<Compile Include="Communications\OutboundComms.cs" />
|
||||
<Compile Include="Communications\Transmission\NotificationPayload.cs" />
|
||||
<Compile Include="Communications\Transmission\PayloadBase.cs" />
|
||||
<Compile Include="Financial\CashAdvance.cs" />
|
||||
<Compile Include="Financial\CashAdvances.cs" />
|
||||
<Compile Include="Financial\ImportedBankData.cs" />
|
||||
@@ -216,6 +222,16 @@
|
||||
<Compile Include="Support\SingularFactory.cs" />
|
||||
<Compile Include="Support\TemporaryIdentity.cs" />
|
||||
<Compile Include="Support\UrlTranslations.cs" />
|
||||
<Compile Include="Swarmops.Logic.Localizations.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Swarmops.Logic.Localizations.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SwarmopsLogicLoc.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>SwarmopsLogicLoc.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Swarm\Activists.cs" />
|
||||
<Compile Include="Swarm\AuditedPerson.cs" />
|
||||
<Compile Include="Swarm\ChurnData.cs" />
|
||||
@@ -281,6 +297,14 @@
|
||||
<LastGenOutput>Authentication.sv-SE.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Swarmops.Logic.Localizations.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Swarmops.Logic.Localizations.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SwarmopsLogicLoc.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>SwarmopsLogicLoc.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
||||
</Project>
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.296
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Swarmops.Logic {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Swarmops_Logic_Localizations {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Swarmops_Logic_Localizations() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Swarmops.Logic.Swarmops.Logic.Localizations", typeof(Swarmops_Logic_Localizations).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Swarmops Backend version [VERSION] on host [HOSTNAME] has successfully started and connected to database and notification frameworks..
|
||||
/// </summary>
|
||||
internal static string Notifications_System_Startup_Body {
|
||||
get {
|
||||
return ResourceManager.GetString("Notifications_System_Startup_Body", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Swarmops Backend operational.
|
||||
/// </summary>
|
||||
internal static string Notifications_System_Startup_Subject {
|
||||
get {
|
||||
return ResourceManager.GetString("Notifications_System_Startup_Subject", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Test.
|
||||
/// </summary>
|
||||
internal static string Test {
|
||||
get {
|
||||
return ResourceManager.GetString("Test", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Notifications_System_Startup_Body" xml:space="preserve">
|
||||
<value>Swarmops Backend version [VERSION] on host [HOSTNAME] has successfully started and connected to database and notification frameworks.</value>
|
||||
</data>
|
||||
<data name="Notifications_System_Startup_Subject" xml:space="preserve">
|
||||
<value>Swarmops Backend operational</value>
|
||||
</data>
|
||||
<data name="Test" xml:space="preserve">
|
||||
<value>Test</value>
|
||||
</data>
|
||||
</root>
|
||||
Generated
+72
@@ -0,0 +1,72 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.296
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Swarmops.Logic {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class SwarmopsLogicLoc {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal SwarmopsLogicLoc() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Swarmops.Logic.SwarmopsLogicLoc", typeof(SwarmopsLogicLoc).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Test2.
|
||||
/// </summary>
|
||||
internal static string Test {
|
||||
get {
|
||||
return ResourceManager.GetString("Test", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Test" xml:space="preserve">
|
||||
<value>Test2</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -145,6 +145,7 @@
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Communications\" />
|
||||
<Folder Include="Rss\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
||||
|
||||
Reference in New Issue
Block a user