コード例 #1
0
        protected virtual IntervalOfInteger CloneIntervalOfInteger(openehr.common_libs.basic.INTERVAL_INTEGER_32 o)
        {
            IntervalOfInteger result = null;
            result = new IntervalOfInteger();

            System.Diagnostics.Debug.Assert(!result.lower_includedSpecified, "lower included specified must be false!");

            result.lower_unbounded = o.lower_unbounded();

            if (!o.lower_unbounded())
            {
                result.lower = o.lower();
                result.lowerSpecified = true;
                result.lower_included = o.lower_included();
                result.lower_includedSpecified = true;
            }

            result.upper_unbounded = o.upper_unbounded();

            if (!o.upper_unbounded())
            {
                result.upper = o.upper();
                result.upperSpecified = true;
                result.upper_included = o.upper_included();
                result.upper_includedSpecified = true;
            }

            return result;
        }
コード例 #2
0
        protected virtual IntervalOfTime CloneIntervalOfTime(openehr.common_libs.basic.INTERVAL_REFERENCE o)
        {
            IntervalOfTime result = null;

            if (o != null)
            {
                result = new IntervalOfTime();
                result.lower_unbounded = o.lower_unbounded();

                if (!o.lower_unbounded())
                {
                    result.lower = o.lower().ToString();
                    result.lower_included = o.lower_included();
                    result.lower_includedSpecified = true;
                }

                result.upper_unbounded = o.upper_unbounded();

                if (!o.upper_unbounded())
                {
                    result.upper = o.upper().ToString();
                    result.upper_included = o.upper_included();
                    result.upper_includedSpecified = true;
                }
            }

            return result;
        }