Refactoring book query
This commit is contained in:
@ -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
|
||||
|
12
src/Yavsc.Abstract/Messaging/IAnnounce.cs
Normal file
12
src/Yavsc.Abstract/Messaging/IAnnounce.cs
Normal file
@ -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; }
|
||||
}
|
||||
|
||||
}
|
60
src/Yavsc.Abstract/Messaging/RdvQueryEvent.cs
Normal file
60
src/Yavsc.Abstract/Messaging/RdvQueryEvent.cs
Normal file
@ -0,0 +1,60 @@
|
||||
//
|
||||
// BookQueryEvent.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paul@pschneider.fr>
|
||||
//
|
||||
// Copyright (c) 2015-2016 GNU GPL
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
namespace Yavsc.Models.Messaging
|
||||
{
|
||||
using Interfaces.Workflow;
|
||||
using Yavsc.Abstract.Messaging;
|
||||
|
||||
public class RdvQueryEvent: RdvQueryProviderInfo, IEvent
|
||||
{
|
||||
public string SubTopic
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public RdvQueryEvent(string subTopic)
|
||||
{
|
||||
Topic = MessagingConstants.TopicRdvQuery;
|
||||
SubTopic = subTopic;
|
||||
}
|
||||
|
||||
public string Sender
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string Topic
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public string CreateBody()
|
||||
{
|
||||
return string.Format(Resources.RdvToPerf,
|
||||
Client.UserName,
|
||||
EventDate?.ToString("dddd dd/MM/yyyy à HH:mm"),
|
||||
Location.Address,
|
||||
ActivityCode);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
13
src/Yavsc.Abstract/Messaging/Reason.cs
Normal file
13
src/Yavsc.Abstract/Messaging/Reason.cs
Normal file
@ -0,0 +1,13 @@
|
||||
namespace Yavsc.Models.Messaging
|
||||
{
|
||||
public enum Reason : byte
|
||||
{
|
||||
Private,
|
||||
Corporate,
|
||||
SearchingAPro,
|
||||
Selling,
|
||||
Buying,
|
||||
ServiceProposal
|
||||
}
|
||||
|
||||
}
|
52
src/Yavsc.Abstract/Resources/Yavsc.Models.Messaging.Resources.Designer.cs
generated
Normal file
52
src/Yavsc.Abstract/Resources/Yavsc.Models.Messaging.Resources.Designer.cs
generated
Normal file
@ -0,0 +1,52 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<!--
|
||||
route name for the api controller used to tag the 'BlogPost' entity
|
||||
-->
|
||||
<data name="RdvToPerf"><value>Rendez-vous professionnel</value></data>
|
||||
</root>
|
Reference in New Issue
Block a user