//SortedDictionary<Guid, Column> columns = new SortedDictionary<Guid, Column> (); //SortedDictionary<int, SortedDictionary<string,Column>> tableColumns = new SortedDictionary<int, SortedDictionary<string, 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."); connectionString = parameters.ConnectionString; objectBusSession.RegisterType (typeof(GetTablesRequestMessage), GetTablesRequestMessageReceived); objectBusSession.RegisterType (typeof(GetColumnsRequestMessage), GetColumnsRequestMessageReceived); objectBusSession.RegisterType (typeof(GetRowsRequestMessage), GetRowsRequestMessageReceived); objectBusSession.RegisterType (typeof(GetForeignKeyRelationsRequestMessage), GetForeignKeyRelationsRequestMessageReceived); tfqns.Add (48, "System.Byte"); tfqns.Add (173, "System.Byte[]"); tfqns.Add (165, "System.Byte[]"); tfqns.Add (52, "System.Int16"); tfqns.Add (56, "System.Int32"); tfqns.Add (127, "System.Int64"); tfqns.Add (62, "System.Double"); tfqns.Add (106, "System.Double"); tfqns.Add (108, "System.Double"); tfqns.Add (231, "System.String"); tfqns.Add (239, "System.String"); tfqns.Add (175, "System.String"); tfqns.Add (104, "System.Boolean"); tfqns.Add (34, "System.Byte[]"); tfqns.Add (36, "System.Guid"); tfqns.Add (41, "System.DateTime"); tfqns.Add (42, "System.DateTime"); tfqns.Add (43, "System.DateTime"); tfqns.Add (61, "System.DateTime"); }
public static ServiceAgent CreateAgent(ServiceAgentMode serviceAgentMode, ObjectBusSession objectBusSession, Action flush, byte[] parameters) { return(new ServiceAgent(serviceAgentMode, objectBusSession, flush, ServiceParameters.Deserialize(parameters))); }
//SortedDictionary<Guid, Column> columns = new SortedDictionary<Guid, Column> (); //SortedDictionary<int, SortedDictionary<string,Column>> tableColumns = new SortedDictionary<int, SortedDictionary<string, 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."); } connectionString = parameters.ConnectionString; objectBusSession.RegisterType(typeof(GetTablesRequestMessage), GetTablesRequestMessageReceived); objectBusSession.RegisterType(typeof(GetColumnsRequestMessage), GetColumnsRequestMessageReceived); objectBusSession.RegisterType(typeof(GetRowsRequestMessage), GetRowsRequestMessageReceived); objectBusSession.RegisterType(typeof(GetForeignKeyRelationsRequestMessage), GetForeignKeyRelationsRequestMessageReceived); tfqns.Add(48, "System.Byte"); tfqns.Add(173, "System.Byte[]"); tfqns.Add(165, "System.Byte[]"); tfqns.Add(52, "System.Int16"); tfqns.Add(56, "System.Int32"); tfqns.Add(127, "System.Int64"); tfqns.Add(62, "System.Double"); tfqns.Add(106, "System.Double"); tfqns.Add(108, "System.Double"); tfqns.Add(231, "System.String"); tfqns.Add(239, "System.String"); tfqns.Add(175, "System.String"); tfqns.Add(104, "System.Boolean"); tfqns.Add(34, "System.Byte[]"); tfqns.Add(36, "System.Guid"); tfqns.Add(41, "System.DateTime"); tfqns.Add(42, "System.DateTime"); tfqns.Add(43, "System.DateTime"); tfqns.Add(61, "System.DateTime"); }