Exemplo n.º 1
0
        public static void registerEvent(ActionDisp_ action)
        {
            Ice.Communicator ic    = Ice.Application.communicator();
            Ice.ObjectPrx    base_ = Adapter.Instance.add(
                action, ic.stringToIdentity(action.getEventType()));
            ActionPrx proxy = ActionPrxHelper.checkedCast(base_);

            actionList.Add(proxy);
        }
Exemplo n.º 2
0
        public RegisterEventAttribute(Type typeName)
        {
            PropertyInfo propInfo = typeName.GetProperty("Instance");
            ActionDisp_  action   = propInfo.GetValue(null, null) as ActionDisp_;

            if (action != null)
            {
                EventFactory.registerEvent(action);
            }
            else
            {
                Console.Error.WriteLine("Could not register event {0}", typeName);
            }
        }