init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
30
Framework/Session/ServiceSystemSession.cs
Normal file
30
Framework/Session/ServiceSystemSession.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using Kreta.Framework.Security;
|
||||
using SDA.DataProvider;
|
||||
|
||||
namespace Kreta.Framework.Session
|
||||
{
|
||||
public class ServiceSystemSession : UserContext
|
||||
{
|
||||
protected internal const string SessionId = "SERVICE_SYSTEM";
|
||||
|
||||
public ServiceSystemSession(string systemConnectionString) :
|
||||
base(new LoginInfo(SessionId, 0, "127.0.0.1", int.MaxValue, SessionId), new ServiceSystemTransactionContext(systemConnectionString))
|
||||
{
|
||||
}
|
||||
|
||||
private class ServiceSystemTransactionContext : TransactionContext
|
||||
{
|
||||
private string connectionString;
|
||||
|
||||
public ServiceSystemTransactionContext(string connectionstring) : base(null)
|
||||
{
|
||||
connectionString = connectionstring;
|
||||
}
|
||||
|
||||
internal override SDAConnection CreateConnection()
|
||||
{
|
||||
return SDAServer.Instance.CreateConnection(connectionString);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue