diff --git a/src/Yavsc.Abstract/Makefile b/src/Yavsc.Abstract/Makefile
index 1e3da53a..81917d91 100644
--- a/src/Yavsc.Abstract/Makefile
+++ b/src/Yavsc.Abstract/Makefile
@@ -1,6 +1,6 @@
SOURCE_DIR=$(HOME)/workspace/yavsc
MAKEFILE_DIR=$(SOURCE_DIR)/scripts/build/make
-BASERESX=Resources/Yavsc.Attributes.Validation.Resources.resx
+BASERESX=Resources/Yavsc.Attributes.Validation.Resources.resx Resources/Yavsc.Models.Messaging.Resources.resx
BASERESXGEN=$(BASERESX:.resx=.Designer.cs)
include $(MAKEFILE_DIR)/versioning.mk
include $(MAKEFILE_DIR)/dnx.mk
diff --git a/src/Yavsc.Abstract/Messaging/IAnnounce.cs b/src/Yavsc.Abstract/Messaging/IAnnounce.cs
new file mode 100644
index 00000000..cd1957af
--- /dev/null
+++ b/src/Yavsc.Abstract/Messaging/IAnnounce.cs
@@ -0,0 +1,12 @@
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using Yavsc.Interfaces;
+
+namespace Yavsc.Models.Messaging
+{
+ public interface IAnnounce : IOwned {
+ Reason For { get; set; }
+ string Message { get; set; }
+ }
+
+}
\ No newline at end of file
diff --git a/src/Yavsc.Server/Models/Messaging/RdvQueryEvent.cs b/src/Yavsc.Abstract/Messaging/RdvQueryEvent.cs
similarity index 92%
rename from src/Yavsc.Server/Models/Messaging/RdvQueryEvent.cs
rename to src/Yavsc.Abstract/Messaging/RdvQueryEvent.cs
index 02d59187..b3109c74 100644
--- a/src/Yavsc.Server/Models/Messaging/RdvQueryEvent.cs
+++ b/src/Yavsc.Abstract/Messaging/RdvQueryEvent.cs
@@ -21,7 +21,7 @@
namespace Yavsc.Models.Messaging
{
-using Interfaces.Workflow;
+ using Interfaces.Workflow;
using Yavsc.Abstract.Messaging;
public class RdvQueryEvent: RdvQueryProviderInfo, IEvent
@@ -49,8 +49,7 @@ using Interfaces.Workflow;
public string CreateBody()
{
- return string.Format(
- ResourcesHelpers.GlobalLocalizer["RdvToPerf"],
+ return string.Format(Resources.RdvToPerf,
Client.UserName,
EventDate?.ToString("dddd dd/MM/yyyy à HH:mm"),
Location.Address,
diff --git a/src/Yavsc.Abstract/Messaging/Reason.cs b/src/Yavsc.Abstract/Messaging/Reason.cs
new file mode 100644
index 00000000..e9648ea4
--- /dev/null
+++ b/src/Yavsc.Abstract/Messaging/Reason.cs
@@ -0,0 +1,13 @@
+namespace Yavsc.Models.Messaging
+{
+ public enum Reason : byte
+ {
+ Private,
+ Corporate,
+ SearchingAPro,
+ Selling,
+ Buying,
+ ServiceProposal
+ }
+
+}
\ No newline at end of file
diff --git a/src/Yavsc.Abstract/Resources/Yavsc.Models.Messaging.Resources.Designer.cs b/src/Yavsc.Abstract/Resources/Yavsc.Models.Messaging.Resources.Designer.cs
new file mode 100644
index 00000000..c4fbcc6e
--- /dev/null
+++ b/src/Yavsc.Abstract/Resources/Yavsc.Models.Messaging.Resources.Designer.cs
@@ -0,0 +1,52 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Yavsc.Models.Messaging {
+ using System;
+ using System.Reflection;
+
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ public partial class Resources {
+
+ private static System.Resources.ResourceManager resourceMan;
+
+ private static System.Globalization.CultureInfo resourceCulture;
+
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.Equals(null, resourceMan)) {
+ System.Resources.ResourceManager temp = new System.Resources.ResourceManager(("Yavsc.Abstract.Resources." + "Yavsc.Models.Messaging.Resources"), typeof(Resources).GetTypeInfo().Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ public static string RdvToPerf {
+ get {
+ return ResourceManager.GetString("RdvToPerf", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/src/Yavsc.Abstract/Resources/Yavsc.Models.Messaging.Resources.resx b/src/Yavsc.Abstract/Resources/Yavsc.Models.Messaging.Resources.resx
new file mode 100644
index 00000000..803ac031
--- /dev/null
+++ b/src/Yavsc.Abstract/Resources/Yavsc.Models.Messaging.Resources.resx
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Rendez-vous professionnel
+
\ No newline at end of file
diff --git a/src/Yavsc.Server/Models/Messaging/Announce.cs b/src/Yavsc.Server/Models/Messaging/Announce.cs
index 54e8c04c..d2a3c889 100644
--- a/src/Yavsc.Server/Models/Messaging/Announce.cs
+++ b/src/Yavsc.Server/Models/Messaging/Announce.cs
@@ -1,23 +1,16 @@
+
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Interfaces;
namespace Yavsc.Models.Messaging
{
- public enum Reason: byte {
- Private,
- Corporate,
- SearchingAPro,
- Selling,
- Buying,
- ServiceProposal
- }
- public class Announce: BaseEvent, IOwned
+public class Announce : BaseEvent, IAnnounce, IOwned
{
public Reason For { get; set; }
- [Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public string OwnerId { get; set; }
@@ -28,7 +21,7 @@ namespace Yavsc.Models.Messaging
public string Message { get; set; }
public override string CreateBody()
{
- return $"Annonce de {Owner.UserName}: {For}\n\n{Message}";
+ return $"Annonce de {Owner.UserName}: {For.ToString()}\n\n{Message}";
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Yavsc/Services/YavscMessageSender.cs b/src/Yavsc/Services/YavscMessageSender.cs
index 15f4c3a0..88e8c94f 100644
--- a/src/Yavsc/Services/YavscMessageSender.cs
+++ b/src/Yavsc/Services/YavscMessageSender.cs
@@ -126,7 +126,7 @@ namespace Yavsc.Services
// from usr asp.net Id : var hubClient = hubContext.Clients.User(userId);
var hubClient = hubContext.Clients.Client(cxid);
var data = new Dictionary();
- data["event"] = ev;
+ data["event"] = JsonConvert.SerializeObject(ev);
hubClient.push(ev.Topic, JsonConvert.SerializeObject(data));
}
diff --git a/version.txt b/version.txt
index 0fd042b8..24ec43a3 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-1.0.6-rc06
+1.0.6-rc07