示例#1
0
 public ProfileConnector(
     UserStorage userStorage,
     AppServerManager appServerManager,
     AppSettings appSettings,
     ApiServerConnector apiServerConnector,
     ModalManager modalManager)
 {
     _modalManager       = modalManager;
     _userStorage        = userStorage;
     _appServerManager   = appServerManager;
     _appSettings        = appSettings;
     _apiServerConnector = apiServerConnector;
 }
示例#2
0
    static void Main(string[] args)
    {
        string[] subDeviceList1 = new string[5];
        string[] subDeviceList2 = new string[3];
        Array.Copy(deviceIdList, 0, subDeviceList1, 0, 5);
        Array.Copy(deviceIdList, 5, subDeviceList2, 0, 3);

        AppServerManager.getInstance().setRegisterResultListener(
            new AppServerRegisterResultImpl());
        AppServerManager.getInstance().setDeviceGroupListener(
            new DeviceGroupImpl());
        AppServerManager.getInstance().setMsgListener(new MessageImpl());

        AppServerManager.getInstance().registerAppServer(
            Program.serviceId, "C# App Server Test", "gate.rationalowl.com", 9081);

        // Thread.Sleep(5000);
        // AppServerManager.getInstance().unregisterAppServer(Program.serviceId, Program.serverRegId);

        // Thread.Sleep(5000);
        // AppServerManager.getInstance().createDeviceGroup("groupName",
        // "groupDesc", subDeviceList1);

        // Thread.Sleep(5000);
        // AppServerManager.getInstance().addDeviceGroup(groupId, subDeviceList2);

        // Thread.Sleep(5000);
        // AppServerManager.getInstance().subtractDeviceGroup(groupId, subDeviceList2);

        // Thread.Sleep(5000);
        // AppServerManager.getInstance().deleteDeviceGroup(groupId);

        // Thread.Sleep(5000);
        // AppServerManager.getInstance().createDeviceGroup("groupName", "groupDesc",
        //                                                    subDeviceList1);
        Thread.Sleep(5000);
        AppServerManager.getInstance().sendMulticastMsg("멀티캐스트메시지",
                                                        subDeviceList1);
        // Thread.Sleep(5000);
        // AppServerManager.getInstance().sendGroupMsg("그룹메시지", groupId);

        // Thread.Sleep(5000);
        // AppServerManager.getInstance().sendBroadcastMsg("브로드캐스트메시지");

        Console.ReadLine();
    }