/// <seealso cref="Genetibase.NuGenHL7.validation.ValidationContext"> /// #getMessageRules(java.lang.String, java.lang.String, java.lang.String) /// </seealso> public virtual NuGenMessageRule[] getMessageRules(System.String theVersion, System.String theMessageType, System.String theTriggerEvent) { System.Collections.IList active = new System.Collections.ArrayList(myMessageRuleBindings.Count); for (int i = 0; i < myMessageRuleBindings.Count; i++) { System.Object o = myMessageRuleBindings[i]; if (!(o is NuGenRuleBinding)) { throw new System.InvalidCastException("Item in rule binding list is not a RuleBinding"); } NuGenRuleBinding binding = (NuGenRuleBinding)o; if (binding.Active && binding.appliesToVersion(theVersion) && binding.appliesToScope(theMessageType + "^" + theTriggerEvent)) { active.Add(binding.Rule); } } NuGenMessageRule[] retVal = new NuGenMessageRule[active.Count]; active.CopyTo(retVal, 0); return(retVal); }
/// <param name="theVersion">see {@link RuleBinding#getVersion()} /// </param> /// <param name="theMessageType">a value valid for MSH-9-1 or * for all /// </param> /// <param name="theTriggerEvent">a value valid for MSH-9-2 or * for all /// </param> /// <param name="theRule"> /// </param> public NuGenMessageRuleBinding(System.String theVersion, System.String theMessageType, System.String theTriggerEvent, NuGenMessageRule theRule) : base(theVersion, theMessageType + "^" + theTriggerEvent, theRule) { myMessageType = theMessageType; myTriggerEvent = theTriggerEvent; }
/// <seealso cref="Genetibase.NuGenHL7.validation.ValidationContext"> /// #getMessageRules(java.lang.String, java.lang.String, java.lang.String) /// </seealso> public virtual NuGenMessageRule[] getMessageRules(System.String theVersion, System.String theMessageType, System.String theTriggerEvent) { System.Collections.IList active = new System.Collections.ArrayList(myMessageRuleBindings.Count); for (int i = 0; i < myMessageRuleBindings.Count; i++) { System.Object o = myMessageRuleBindings[i]; if (!(o is NuGenRuleBinding)) { throw new System.InvalidCastException("Item in rule binding list is not a RuleBinding"); } NuGenRuleBinding binding = (NuGenRuleBinding) o; if (binding.Active && binding.appliesToVersion(theVersion) && binding.appliesToScope(theMessageType + "^" + theTriggerEvent)) { active.Add(binding.Rule); } } NuGenMessageRule[] retVal = new NuGenMessageRule[active.Count]; active.CopyTo(retVal, 0); return retVal; }
/// <param name="theVersion">see {@link RuleBinding#getVersion()} /// </param> /// <param name="theMessageType">a value valid for MSH-9-1 or * for all /// </param> /// <param name="theTriggerEvent">a value valid for MSH-9-2 or * for all /// </param> /// <param name="theRule"> /// </param> public NuGenMessageRuleBinding(System.String theVersion, System.String theMessageType, System.String theTriggerEvent, NuGenMessageRule theRule):base(theVersion, theMessageType + "^" + theTriggerEvent, theRule) { myMessageType = theMessageType; myTriggerEvent = theTriggerEvent; }