forked from dtm-labs/client-csharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDtmTransFactory.cs
More file actions
34 lines (29 loc) · 914 Bytes
/
DtmTransFactory.cs
File metadata and controls
34 lines (29 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
namespace Dtmcli
{
public class DtmTransFactory : IDtmTransFactory
{
private readonly IDtmClient _cient;
private readonly IBranchBarrierFactory _branchBarrierFactory;
public DtmTransFactory(IDtmClient client, IBranchBarrierFactory branchBarrierFactory)
{
this._cient = client;
this._branchBarrierFactory = branchBarrierFactory;
}
public Msg NewMsg(string gid)
{
var msg = new Msg(_cient, _branchBarrierFactory, gid);
return msg;
}
public Msg NewMsg(string gid, DateTime nextCronTime)
{
var msg = new Msg(_cient, _branchBarrierFactory, gid, nextCronTime);
return msg;
}
public Saga NewSaga(string gid)
{
var saga = new Saga(_cient, gid);
return saga;
}
}
}