Пример #1
0
        public override void DoWork()
        {
            //Debugger.Launch();
            _patientManager = new PatientManager();


            CLRCommunicationProxy proxy = GetCommunicationProxy() as CLRCommunicationProxy;

            proxy.RegisterCommandHandler(90001, new PatientCommandHandler(_patientManager));


            Console.WriteLine("Do work!");
        }
Пример #2
0
        /// <summary>
        /// For local only
        /// </summary>
        //private UIH.XA.XSample.BusinessLogicExcutor.PatientManager TestPatientSource = new BusinessLogicExcutor.PatientManager();



        private byte[] SendSyncToPatientManager(string method, params object[] args)
        {
            CommandContext context = new CommandContext();

            context.iCommandId = BusinessLogicCommand;
            //context.sSender
            context.sReceiver             = BusinessLogicProxyName;
            context.bServiceAsyncDispatch = true;

            PatientRemoteObject rObject = new PatientRemoteObject();

            rObject.InvokeTag = method;
            rObject.Paramters = args;

            context.sSerializeObject = SerializeObj.Serialize(rObject);
            context.iWaitTime        = 30000;


            CLRCommunicationProxy proxy = _appContext.GetObject <ICommunicationProxy>(AppContextObjectName.DefaultCommunicationProxy) as CLRCommunicationProxy;

            ISyncResult result = proxy.SyncSendCommand(context);

            return(result.GetSerializedObject());
        }