diff --git a/Logic/Communications/Transmission/NotificationPayload.cs b/Logic/Communications/Transmission/NotificationPayload.cs
index 8408e5d5..8a638737 100644
--- a/Logic/Communications/Transmission/NotificationPayload.cs
+++ b/Logic/Communications/Transmission/NotificationPayload.cs
@@ -24,8 +24,8 @@ namespace Swarmops.Logic.Communications.Transmission
public NotificationPayload (string notificationResource, NotificationStrings strings)
{
- this.SubjectResource = "Notifications_" + notificationResource + "_Subject";
- this.BodyResource = "Notifications_" + notificationResource + "_Body";
+ this.SubjectResource = notificationResource + "_Subject";
+ this.BodyResource = notificationResource + "_Body";
this.Strings = strings;
}
@@ -35,22 +35,16 @@ namespace Swarmops.Logic.Communications.Transmission
public string GetSubject()
{
- ResourceManager resourceManager = new System.Resources.ResourceManager("Swarmops.Logic.Localizations",
- System.Reflection.Assembly.
- GetExecutingAssembly());
// TODO: Pick culture
- return ExpandMacros(resourceManager.GetString(this.SubjectResource));
+ return ExpandMacros(App_LocalResources.NotificationPayload.ResourceManager.GetString(this.SubjectResource));
}
public string GetBody()
{
- ResourceManager resourceManager = new System.Resources.ResourceManager("Swarmops.Logic.Localizations",
- System.Reflection.Assembly.
- GetExecutingAssembly());
// TODO: Pick culture
- return ExpandMacros(resourceManager.GetString(this.BodyResource));
+ return ExpandMacros(App_LocalResources.NotificationPayload.ResourceManager.GetString(this.BodyResource));
}
public string ExpandMacros (string input)
diff --git a/Logic/Communications/Transmission/PayloadBase.cs b/Logic/Communications/Transmission/PayloadBase.cs
index aa1fa74f..af701fd9 100644
--- a/Logic/Communications/Transmission/PayloadBase.cs
+++ b/Logic/Communications/Transmission/PayloadBase.cs
@@ -23,6 +23,13 @@ namespace Swarmops.Logic.Communications.Transmission
public static T FromXml (string xml)
{
+ // Compensate for Mono bugs
+
+ if (xml.StartsWith("?"))
+ {
+ xml = xml.Substring(1);
+ }
+
var serializer = new XmlSerializer(typeof(T));
var stream = new MemoryStream();
diff --git a/Logic/Logic.csproj b/Logic/Logic.csproj
index a8e7f271..2105e4f4 100644
--- a/Logic/Logic.csproj
+++ b/Logic/Logic.csproj
@@ -72,6 +72,11 @@
+
+ True
+ True
+ NotificationPayload.resx
+
@@ -229,11 +234,6 @@
-
- True
- True
- Swarmops.Logic.Localizations.resx
-
@@ -286,6 +286,10 @@
+
+ ResXFileCodeGenerator
+ NotificationPayload.Designer.cs
+
Designer
@@ -299,10 +303,6 @@
Authentication.sv-SE.Designer.cs
Designer
-
- ResXFileCodeGenerator
- Swarmops.Logic.Localizations.Designer.cs
-
\ No newline at end of file
diff --git a/Logic/Swarmops.Logic.Localizations.Designer.cs b/Logic/Swarmops.Logic.Localizations.Designer.cs
deleted file mode 100644
index d743653c..00000000
--- a/Logic/Swarmops.Logic.Localizations.Designer.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// 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.
-//
-//------------------------------------------------------------------------------
-
-namespace Swarmops.Logic {
- using System;
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // 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() {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [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;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
-
- ///
- /// Looks up a localized string similar to Swarmops Backend version [SwarmopsVersion] on host [HostName] has successfully started and connected to database and notification frameworks..
- ///
- internal static string Notifications_System_Startup_Body {
- get {
- return ResourceManager.GetString("Notifications_System_Startup_Body", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Swarmops Backend operational.
- ///
- internal static string Notifications_System_Startup_Subject {
- get {
- return ResourceManager.GetString("Notifications_System_Startup_Subject", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Test.
- ///
- internal static string Test {
- get {
- return ResourceManager.GetString("Test", resourceCulture);
- }
- }
- }
-}
diff --git a/Logic/Swarmops.Logic.Localizations.resx b/Logic/Swarmops.Logic.Localizations.resx
deleted file mode 100644
index d1b0ace9..00000000
--- a/Logic/Swarmops.Logic.Localizations.resx
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- Swarmops Backend version [SwarmopsVersion] on host [HostName] has successfully started and connected to database and notification frameworks.
-
-
- Swarmops Backend operational
-
-
- Test
-
-
\ No newline at end of file
diff --git a/Site5/Bin/NRss.dll b/Site5/Bin/NRss.dll
deleted file mode 100644
index 52ecf247..00000000
Binary files a/Site5/Bin/NRss.dll and /dev/null differ
diff --git a/Site5/Bin/NRss.pdb b/Site5/Bin/NRss.pdb
deleted file mode 100644
index 98eaf879..00000000
Binary files a/Site5/Bin/NRss.pdb and /dev/null differ
diff --git a/Site5/Bin/NRss.xml b/Site5/Bin/NRss.xml
deleted file mode 100644
index 5d81e1aa..00000000
--- a/Site5/Bin/NRss.xml
+++ /dev/null
@@ -1,878 +0,0 @@
-
-
-
- NRss
-
-
-
-
- Summary description for RssChannelImageElementReader.
-
-
-
-
- Abstract class for reading of RSS elements.
- Every class which reads a RSS elements inherits from ElementReader.
-
-
-
-
- Advances the XML reader to the next content.
-
-
-
-
- Skips the XML reader over the current node and its children.
-
-
-
-
- Reads the contents of an element assumed that the element contains only text.
-
- The element text.
-
-
-
- Ensures the current element is not empty, so we know that we can expect a XmlNodeType.EndElement.
-
-
-
-
- Summary description for RssChannelItemElementReader.
-
-
-
-
- Options for the RSS reader. These options can be specified when creating a new reader.
- You can combine more options with the OR operator.
-
-
-
-
-
- No options (the reader has normal behavior).
-
-
-
-
- When this option is set, the reader will ignore missing elements that are required by the
- RSS specification (e.g a missing channel title).
-
-
-
-
- When this options is set, the reader will ignore "alien" elements, that is elements in an empty namespace
- that are not expected in the context (like an item element as a child of the rss element), or are not
- defined by the RSS specification. Unrecognized elements in a non-empty namespace are always ignored.
-
-
-
-
- When this options is set, the reader will not check that the links begin with http:// or ftp://
- (as required by the RSS 0.91 specification).
-
-
-
-
- This is the main class for reading RSS feeds.
-
- Use the method to read a RSS feed.
-
-
-
- Initializes the RSS reader with a non-resolving XmlTextReader for the specified stream and no options.
-
- A stream to read from.
-
-
-
- Initializes the RSS reader with a non-resolving XmlTextReader for the specified stream and the specified options.
-
- A stream to read from.
- The RssReaderOptions to initialize the reader with.
-
-
-
- Initializes the RSS reader with a resolving or non-resolving XmlTextReader (depending on the resolve parameter) for the specified stream and the specified options.
-
- A stream to read from.
- The RssReaderOptions to initialize the reader with.
- Specifies whether to resolve external resources referenced from the RSS file.
-
-
-
- Initializes the RSS reader with a non-resolving XmlTextReader for the specified file and no options.
-
- An RSS file or URL to read from.
-
-
-
- Initializes the RSS reader with a non-resolving XmlTextReader for the specified file and the specified options.
-
- An RSS file or URL to read from.
- The RssReaderOptions to initialize the reader with.
-
-
-
- Initializes the RSS reader with a resolving or non-resolving XmlTextReader (depending on the resolve parameter) for the specified file and the specified options.
-
- An RSS file to read from.
- The RssReaderOptions to initialize the reader with.
- Specifies whether to resolve external resources referenced from the RSS file.
-
-
-
- Initializes the RSS reader with the specified XmlTextReader and no options.
-
- The XmlTextReader to read from.
-
-
-
- Initializes the RSS reader with the specified XmlTextReader and options.
-
- The XmlTextReader to read from.
- The RssReaderOptions to initialize the reader with.
-
-
-
- Initializes the RSS reader with the specified XmlValidatingReader and no options.
-
- The XmlTextReader to read from.
-
-
-
- Initializes the RSS reader with the specified XmlValidatingReader and options.
-
- The XmlValidatingReader to read from.
- The RssReaderOptions to initialize the reader with.
-
-
-
- Call this method to parse the RSS file. This method returns a object which represents the feed.
-
- The parsed RSS feed as a object.
-
-
-
- Closes the RSS reader and the underlying XML reader.
-
-
-
-
- Gets the XML reader that the RSS reader is using.
-
-
-
-
- Indicates whether the reader should ignore missing elements. This property is true iff the
- reading was instantiated with the option.
-
-
-
-
- Indicates whether the reader should ignore "alien" elements. This property is true iff the
- reading was instantiated with the option.
-
-
-
-
- Indicates whether the reader should check that links begin with http:// or ftp://. This property is true iff the
- reading was instantiated with the option.
-
-
-
-
- Summary description for RssElementReader.
-
-
-
-
- Checks that the link matches the RSS 0.91 specification (has the accepted schemes).
-
- The link to check.
- Thrown if the link does not match the specification.
-
-
-
- Checks that the link begins has a http:// scheme.
-
- The link to check.
- Thrown if the link does not begin with http://.
-
-
-
- Converts a RSS date/time to a .NET DateTime.
-
- The RSS date/time to convert.
- The parsed date as a DateTime in Universal Time.
- Thrown if the date/time is not a valid RSS 822 date/time.
-
-
-
- Converts a string to an integer.
-
- The string to convert.
- The converted integer.
-
-
-
- Converts a string to a boolean value.
-
-
- The converted boolean.
-
-
-
- Checks that the passed value is a valid TCP port value (a number from 1 to 65535).
-
- The value to check
- Thrown if the value is not a valid TCP port.
-
-
-
- Checks that the passed value is a valid cloud protocol. The method is case-sensitive.
-
- The value to check.
- Thrown if the value is not a valid cloud protocol.
-
-
-
- Converts a RSS text version to a RssVersion enumeration member.
-
- The version to convert, such as "0.91".
- The converted version.
-
-
-
- Reads a <category> element.
-
- The read element as a .
-
-
-
- Returns information about the an exception thrown by the RSS reader.
-
-
-
-
- Creates the exception.
-
- The exception message.
-
-
-
- Messages displayed by the RSS reader, including errors.
-
-
-
-
- RSS element names.
-
-
-
-
- RSS attribute names.
-
-
-
-
- Schemes for the RSS item element.
-
-
-
-
- RSS version numbers as text
-
-
-
-
- This exception is thrown if the date/time parsed by the was not valid.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Initializes a new instance.
-
- The exception that caused this exception.
-
-
-
- Parses a date/time expression according to RFC 822, section 5. This is the date format used by RSS.
-
-
-
-
- Parses a date/time RFC 822 expression.
-
- The string to parse.
- The parsed date/time converted to Universal Time.
-
-
-
- Summary description for RssChannelTextInputElementReader.
-
-
-
-
- Summary description for RssChannelSkipDaysElementReader.
-
-
-
-
- Summary description for RssChannelSkipHoursElementReader.
-
-
-
-
- RSS version numbers.
-
-
-
-
- Version number is not known.
-
-
-
-
- RSS version 0.91
-
-
-
-
- RSS version 0.92
-
-
-
-
- RSS version 0.93
-
-
-
-
- RSS version 2.0
-
-
-
-
- Represents a RSS feed.
-
- The feed properties map to the child elements of a RSS elements.
- For example, the RSS feed has a <channel> element, so the Rss class
- has a property and so on.
- The property for any missing child element will have a null value.
- For each property with a value type,
- such as property of RssChannel,
- there will also be a PropertyNameNotPresent to indicate a null value
- (such as in this case).
-
-
-
- Gets or sets the version of this feed.
-
-
-
-
- Gets or sets the channel of this feed.
-
-
-
-
- Represents a RSS channel.
-
-
-
-
- Initializes the channel.
-
-
-
-
- Gets or sets the channel title.
-
-
-
-
- Gets or sets the channel link.
-
-
-
-
- Gets or sets the channel description.
-
-
-
-
- Gets or sets the channel language.
-
-
-
-
- Gets or sets the channel copyright string.
-
-
-
-
- Gets or sets the managing editor of the channel.
-
-
-
-
- Gets or sets the webmaster or technical contact for the channel.
-
-
-
-
- Gets or sets the PICS rating of the channel.
-
-
-
-
- Gets or sets the URL to the RSS documentation.
-
-
-
-
- Gets or sets the channel content publication date/time.
-
-
-
-
- Gets or sets a value indicating whether the property has been read. A true value indicates a missing <pubDate> element in the channel.
-
-
-
-
- Gets or sets the date/time of the last change of the channel.
-
-
-
-
- Gets a value indicating whether the property has been read. A true value indicates a missing <lastBuildDate> element in the channel.
-
-
-
-
- Gets or sets the image information of the channel.
-
-
-
-
- Gets or sets the contents of the <textInput> element of the channel.
-
-
-
-
- Gets or sets the days when the channel should not be read.
-
-
-
-
- Gets or sets the hours when the channel should not be read.
-
-
-
-
- Gets or sets the items contained in the channel.
-
-
-
-
- Gets or sets data aboud a rssCloud interface.
-
-
-
-
- Gets or sets the collection of categories this channel belongs to.
-
-
-
-
- Gets or sets a string indicating the program used to generated the channel.
-
-
-
-
- Gets a sets a number of minutes that indicated how long a channel can be cached before refreshing from the source.
-
-
-
-
- Gets or sets a value indicating whether was read from the feed. A true value indicates a missing <ttl> element in the channel.
-
-
-
-
- Represents a RSS item.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Gets the item title.
-
-
-
-
- Gets the item link.
-
-
-
-
- Gets the item description.
-
-
-
-
- Gets or sets the source of the item.
-
-
-
-
- Gets or sets the enclosure of the item.
-
-
-
-
- Gets or sets the category of the item.
-
-
-
-
- Gets or sets the date when the item will become available.
-
-
-
-
- Gets or sets a value indicating if exists (has been read).
-
-
-
-
- Gets or sets the date when the item will no longer be available.
-
-
-
-
- Gets or sets a value indicating if exists (has been read).
-
-
-
-
- Gets or sets the e-mail address of the author of the channel.
-
-
-
-
- Gets or sets an URL page for comments relating to the item.
-
-
-
-
- Gets or sets a value, which encapsulates a string that uniquely identifies the item.
-
-
-
-
- Represents a collection of channel items.
-
-
-
-
- Adds a new item to the collection. The item cannot be null.
-
- The item to be added.
-
-
-
- Removes an item from the collection, if it exists in it.
-
- The item to be removed.
-
-
-
- Gets or sets the item at a position in the collection.
-
-
-
-
- Represents the image for the channel.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Gets or sets the image URL.
-
-
-
-
- Gets or sets the image description.
-
-
-
-
- Gets or sets the address of the channel.
-
-
-
-
- Gets or sets the image width.
-
-
-
-
- Gets or sets a value indicating whether the property has been read. A true value indicates a missing <width> element.
-
-
-
-
- Gets or sets the image height.
-
-
-
-
- Gets or sets a value indicating whether the property has been read. A true value indicates a missing <height> element.
-
-
-
-
- Gets or sets the a more detailed image description.
-
-
-
-
- Represents a channel <textInput> element.
-
-
-
-
- Gets or sets the label of the submit button.
-
-
-
-
- Gets or sets a description of the text area.
-
-
-
-
- Gets or sets the name of the text area.
-
-
-
-
- Gets or sets the URL of the page that processes the request.
-
-
-
-
- Represents a collection of days when the channel should not be read.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Gets or sets whether a day should be skipped.
-
-
-
-
- Gets the number of days that should be skipped.
-
-
-
-
- Represents a collection of hours when the channel should not be read.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Gets or sets whether the hour should be skipped.
-
-
-
-
- Gets the number of days that should be skipped.
-
-
-
-
- Represents the source of a channel item.
-
-
-
-
- Gets or sets the url of the source.
-
-
-
-
- Gets or sets the name of the source.
-
-
-
-
- Represents an enclosure of a channel item.
-
-
-
-
- Gets or sets the url of the enclosure.
-
-
-
-
- Gets or sets the MIME type of the enclosure.
-
-
-
-
- Gets or sets the length of the enclosure in bytes.
-
-
-
-
- Represents a collection of item enclosures.
-
-
-
-
- Adds a new item to the collection. The item cannot be null.
-
- The item to be added.
-
-
-
- Removes an item from the collection, if it exists in it.
-
- The item to be removed.
-
-
-
- Gets or sets the item at a position in the collection.
-
-
-
-
- Represents data of a web service that provides notifications of channel updates.
-
-
-
-
- Gets or sets the domain of the cloud.
-
-
-
-
- Gets or sets the path to the cloud responder.
-
-
-
-
- Gets or sets the name of the procedure to call to request notification.
-
-
-
-
- Gets or sets the protocol used to call the cloud.
-
-
-
-
- Gets the TCP port the cloud is running on.
-
-
-
-
- Represents the category of the item or channel in a categorization taxonomy.
-
-
-
-
- Gets or sets the domain, which identifies the categorization taxonomy.
-
-
-
-
- Gets or sets the location in the indicated taxonomy.
-
-
-
-
- Represents a collection of item enclosures.
-
-
-
-
- Adds a new item to the collection. The item cannot be null.
-
- The item to be added.
-
-
-
- Removes an item from the collection, if it exists in it.
-
- The item to be removed.
-
-
-
- Gets or sets the item at a position in the collection.
-
-
-
-
- Represents a string that uniquely identifies the item and whether this string is a URL.
-
-
-
-
- Initializes a new instance.
-
-
-
-
- Converts this instance to a string.
-
- The unique string encapsulated in this instance.
-
-
-
- Gets or sets the unique string.
-
-
-
-
- Gets or sets a boolean value indicating whether is a URL.
-
-
-
-
- Gets or sets a value indicating whether was read from the
- source feed. A true value indicates a missing isPermaLink attribute,
- in which case will have its default value true.
-
-
-
-
diff --git a/Utility/Communications/CommsTransmitterMail.cs b/Utility/Communications/CommsTransmitterMail.cs
index 80c9617f..73a2a3eb 100644
--- a/Utility/Communications/CommsTransmitterMail.cs
+++ b/Utility/Communications/CommsTransmitterMail.cs
@@ -28,11 +28,11 @@ namespace Swarmops.Utility.Communications
// This is a rather simple mail (no images or stuff like that)
- mail.From = new MailAddress(comm[CommRenderPart.SenderMail], comm[CommRenderPart.SenderMail], Encoding.UTF8);
+ mail.From = new MailAddress(comm[CommRenderPart.SenderMail], comm[CommRenderPart.SenderName], Encoding.UTF8);
mail.To.Add(new MailAddress(person.Mail, person.Name));
mail.Subject = comm[CommRenderPart.Subject];
- mail.Body = comm[CommRenderPart.Subject];
+ mail.Body = comm[CommRenderPart.BodyText];
mail.SubjectEncoding = Encoding.UTF8;
mail.BodyEncoding = Encoding.UTF8;