コード例 #1
0
ファイル: ServiceAgent.cs プロジェクト: vebin/BD2
 //SortedDictionary<Guid, Column> columns = new SortedDictionary<Guid, Column> ();
 ServiceAgent(ServiceAgentMode serviceAgentMode, ObjectBusSession objectBusSession, Action flush, ServiceParameters parameters)
     : base(serviceAgentMode, objectBusSession, flush, false)
 {
     if (serviceAgentMode != ServiceAgentMode.Server)
         throw new Exception ("This service agent can only be run in server mode.");
     conn = new SqliteConnection (parameters.ConnectionString);
     objectBusSession.RegisterType (typeof(GetTablesRequestMessage), GetTablesRequestMessageReceived);
     objectBusSession.RegisterType (typeof(GetColumnsRequestMessage), GetColumnsRequestMessageReceived);
     objectBusSession.RegisterType (typeof(GetRowsRequestMessage), GetRowsRequestMessageReceived);
     objectBusSession.RegisterType (typeof(GetForeignKeyRelationsRequestMessage), GetForeignKeyRelationsRequestMessageReceived);
 }
コード例 #2
0
ファイル: ServiceAgent.cs プロジェクト: nGenieDeveloper/BD2
 public static ServiceAgent CreateAgent(ServiceAgentMode serviceAgentMode, ObjectBusSession objectBusSession, Action flush, byte[] parameters)
 {
     return(new ServiceAgent(serviceAgentMode, objectBusSession, flush, ServiceParameters.Deserialize(parameters)));
 }
コード例 #3
0
ファイル: ServiceAgent.cs プロジェクト: nGenieDeveloper/BD2
 //SortedDictionary<Guid, Column> columns = new SortedDictionary<Guid, Column> ();
 ServiceAgent(ServiceAgentMode serviceAgentMode, ObjectBusSession objectBusSession, Action flush, ServiceParameters parameters)
     : base(serviceAgentMode, objectBusSession, flush, false)
 {
     if (serviceAgentMode != ServiceAgentMode.Server)
     {
         throw new Exception("This service agent can only be run in server mode.");
     }
     conn = new SqliteConnection(parameters.ConnectionString);
     objectBusSession.RegisterType(typeof(GetTablesRequestMessage), GetTablesRequestMessageReceived);
     objectBusSession.RegisterType(typeof(GetColumnsRequestMessage), GetColumnsRequestMessageReceived);
     objectBusSession.RegisterType(typeof(GetRowsRequestMessage), GetRowsRequestMessageReceived);
     objectBusSession.RegisterType(typeof(GetForeignKeyRelationsRequestMessage), GetForeignKeyRelationsRequestMessageReceived);
 }