forked from connamara/quickfixn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFileStoreFactory.cs
executable file
·34 lines (30 loc) · 969 Bytes
/
FileStoreFactory.cs
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
namespace QuickFix
{
/// <summary>
/// Creates a message store that stores messages in a file
/// </summary>
public class FileStoreFactory : IMessageStoreFactory
{
private SessionSettings settings_;
/// <summary>
/// Create the factory with configuration in session settings
/// </summary>
/// <param name="settings"></param>
public FileStoreFactory(SessionSettings settings)
{
settings_ = settings;
}
#region MessageStoreFactory Members
/// <summary>
/// Creates a file-based message store
/// </summary>
/// <param name="sessionID">session ID for the message store</param>
/// <returns></returns>
public IMessageStore Create(SessionID sessionID)
{
return new FileStore(settings_.Get(sessionID).GetString(SessionSettings.FILE_STORE_PATH), sessionID);
}
#endregion
}
}