Files
using.cash/Logic/Communications/OutboundCommRecipient.cs
T
2014-10-08 23:53:12 +02:00

43 lines
1.1 KiB
C#

using Swarmops.Basic.Types.Communications;
using Swarmops.Database;
using Swarmops.Logic.Swarm;
namespace Swarmops.Logic.Communications
{
public class OutboundCommRecipient: BasicOutboundCommRecipient
{
private OutboundCommRecipient(BasicOutboundCommRecipient basic): base (basic)
{
// private ctor
}
public static OutboundCommRecipient FromBasic (BasicOutboundCommRecipient basic)
{
return new OutboundCommRecipient(basic);
}
public Person Person
{
get { return Person.FromIdentity(base.PersonId); }
}
public void CloseSuccess()
{
SwarmDb.GetDatabaseForWriting().SetOutboundCommRecipientClosed(this.Identity);
base.Success = true;
base.Open = false;
}
public void CloseFailed(string failReason)
{
SwarmDb.GetDatabaseForWriting().SetOutboundCommRecipientFailed(this.Identity, failReason);
base.Success = false;
base.Open = false;
}
// TODO: CloseSuccess, CloseFail
}
}