2016-05-17 18:22:18 +02:00
|
|
|
|
//
|
|
|
|
|
|
// BaseEvent.cs
|
2015-11-17 22:03:42 +01:00
|
|
|
|
//
|
|
|
|
|
|
// Author:
|
|
|
|
|
|
// Paul Schneider <paul@pschneider.fr>
|
|
|
|
|
|
//
|
|
|
|
|
|
// Copyright (c) 2015 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/>.
|
2016-05-17 18:22:18 +02:00
|
|
|
|
|
2015-11-17 22:03:42 +01:00
|
|
|
|
|
2016-05-17 18:22:18 +02:00
|
|
|
|
namespace Yavsc.Models.Messaging
|
2015-11-17 22:03:42 +01:00
|
|
|
|
{
|
2017-02-22 22:45:59 +01:00
|
|
|
|
using Interfaces.Workflow;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2017-06-02 21:34:18 +02:00
|
|
|
|
/// /// Base event.
|
2017-02-22 22:45:59 +01:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
2018-02-03 20:17:29 +01:00
|
|
|
|
public abstract class BaseEvent : IEvent {
|
2016-09-17 03:36:34 +02:00
|
|
|
|
public BaseEvent()
|
|
|
|
|
|
{
|
|
|
|
|
|
Topic = GetType().Name;
|
|
|
|
|
|
}
|
|
|
|
|
|
public BaseEvent(string topic)
|
|
|
|
|
|
{
|
2017-06-02 21:34:18 +02:00
|
|
|
|
Topic = GetType().Name+"/"+topic;
|
2016-09-17 03:36:34 +02:00
|
|
|
|
}
|
2017-06-02 21:34:18 +02:00
|
|
|
|
public string Topic { get; private set; }
|
2016-09-17 03:36:34 +02:00
|
|
|
|
public string Sender { get; set; }
|
2018-02-03 20:17:29 +01:00
|
|
|
|
|
|
|
|
|
|
abstract public string CreateBody();
|
2016-09-17 03:36:34 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-11-17 22:03:42 +01:00
|
|
|
|
|
2016-05-17 18:22:18 +02:00
|
|
|
|
}
|