Files
ayanova7/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/GenMessageDelivery.cs
2018-06-29 19:47:36 +00:00

61 lines
2.1 KiB
C#

using System;
namespace GZTW.AyaNova.BLL
{
/// <summary>
/// Abstract class for physically delivering
/// notification messages.
/// </summary>
public abstract class GenMessageDelivery
{
#pragma warning disable 1591
private string _toAddress="";
private string _fromAddress="";
private string _subject="";
private string _message="";
protected string mError="";
private string _host="";
private int _port = 25;//Case 515
private string _login="";
private string _password="";
private Guid _AyaNovaRecipientUserID=Guid.Empty;
private Guid _RootObjectID;
private RootObjectTypes _RootObjectType;
protected bool mFailedDelivery;
protected GenMessageDelivery()
{}
public string Host{get{return _host;}set{_host=value;}}
public int Port { get { return _port; } set { _port = value; } }//Case 515
public string ToAddress{get{return _toAddress;}set{_toAddress=value;}}
public string FromAddress{get{return _fromAddress;}set{_fromAddress=value;}}
public string Subject{get{return _subject;}set{_subject=value;}}
public string Message{get{return _message;}set{_message=value;}}
public string Error{get{return mError;}}
public string Login{get{return _login;}set{_login=value;}}
public string Password{get{return _password;}set{_password=value;}}
public Guid AyaNovaRecipientUserID{get{return _AyaNovaRecipientUserID;}set{_AyaNovaRecipientUserID=value;}}
public bool FailedDelivery{get{return mFailedDelivery;}}
public Guid RootObjectID{get{return _RootObjectID;}set{_RootObjectID=value;}}
public RootObjectTypes RootObjectType{get{return _RootObjectType;}set{_RootObjectType=value;}}
/// <summary>
/// Performs delivery,
/// returns true on sucess or false on failure
/// </summary>
/// <returns></returns>
public abstract bool Deliver();
/// <summary>
/// Indicates message contains enough
/// info for delivery and/or address
/// is in the correct format for delivery
/// </summary>
public abstract bool IsValid{get; }
#pragma warning restore 1591
}
}