/// <summary> /// Class Constructor. /// </summary> /// <param name="hl7Server">HL7 Server.</param> public Hl7ThreadForHl7Server(Hl7Server hl7Server) { _hl7Server = hl7Server; }
/// <summary> /// Create a Hl7 Server of the given type. /// </summary> /// <param name="hl7ServerType">Hl7 Server Type - enum.</param> /// <param name="toActor">To Actor instance.</param> /// <param name="fromActorName">From Actor Name.</param> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">HL7 Configuration.</param> /// <returns>Hl7 Server.</returns> public static Hl7Server CreateHl7Server(Hl7ServerTypeEnum hl7ServerType, BaseActor toActor, ActorName fromActorName, CommonConfig commonConfig, Hl7PeerToPeerConfig config) { Hl7Server hl7Server = null; switch (hl7ServerType) { case Hl7ServerTypeEnum.Hl7QueryServer: hl7Server = new Hl7QueryServer(toActor, fromActorName, commonConfig, config); break; case Hl7ServerTypeEnum.Hl7Server: hl7Server = new Hl7Server(toActor, fromActorName, commonConfig, config); break; case Hl7ServerTypeEnum.Unknown: default: break; } return hl7Server; }
private void SubscribeEvent(Hl7Server hl7Server) { hl7Server.OnTransactionAvailable += new Hl7Server.TransactionAvailableHandler(TransactionIsAvailable); hl7Server.OnMessageAvailable += new Hl7Server.MessageAvailableHandler(MessageIsAvailable); }