Example #1
0
       public void AddExcludeToSlot(ARCHETYPE_SLOT slot, ASSERTION assert)
       {
           int i;

           if (slot.excludes == null)
           {
               slot.excludes = Array.CreateInstance(typeof(ASSERTION), 1) as ASSERTION[];
               i = 0;
           }
           else
           {
               ASSERTION[] assertions = slot.excludes;
               i = assertions.Length;
               Array.Resize(ref assertions, i + 1);
               slot.excludes = assertions;
           }
           slot.excludes[i] = assert;
       }
        protected virtual ASSERTION[] CloneAssertion(EiffelStructures.list.ARRAYED_LIST_REFERENCE adlList)
        {
            ASSERTION[] result = null;

            if (adlList != null)
            {
                result = new ASSERTION[adlList.count()];

                for (int i = 1; i <= adlList.count(); i++)
                {
                    openehr.openehr.am.archetype.assertion.ASSERTION assert = adlList.i_th(i) as openehr.openehr.am.archetype.assertion.ASSERTION;
                    ASSERTION localAssertion = new ASSERTION();

                    if (assert.tag() != null)
                        localAssertion.tag = assert.tag().ToString();

                    // 0..1 string_expression string
                    //localAssertion.string_expression  (not implemented in adl object)

                    if (assert.expression() != null)
                        localAssertion.expression = CloneExprItem(assert.expression());

                    // 0..* variables ASSERTION_VARIABLE (not implememented in adl object)                            

                    result[i - 1] = localAssertion;
                }
            }

            return result;
        }