Ejemplo n.º 1
0
 /// <summary>
 ///   CTOR
 /// </summary>
 /// <param name = "fldRef">a reference to the field</param>
 internal RunTimeEvent(Field fldRef)
     : base()
 {
     _eventFld = fldRef;
     init(fldRef != null
          ? (Task)fldRef.getTask()
          : null);
 }
Ejemplo n.º 2
0
        /// <summary>
        ///   build the XML string for the argument
        /// </summary>
        /// <param name = "message">the XML string to append the argument to</param>
        protected internal void buildXML(StringBuilder message)
        {
            switch (_type)
            {
            case ConstInterface.ARG_TYPE_FIELD:
                message.Append("F:" + _fld.getTask().getTaskTag() + "," + _fld.getId());
                break;

            case ConstInterface.ARG_TYPE_EXP:
                message.Append("E:" + _exp.getId());
                break;

            case ConstInterface.ARG_TYPE_SKIP:
                message.Append("X:0");
                break;

            default:
                Logger.Instance.WriteExceptionToLog("in Argument.buildXML() illegal type: " + _type);
                break;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        ///   set the value of this argument to a given field
        /// </summary>
        /// <param name = "destFld">the destination field
        /// </param>
        internal void setValueToField(Field destFld)
        {
            String val;
            bool   isNull;

            switch (_type)
            {
            case ConstInterface.ARG_TYPE_FIELD:
                val    = _fld.getValue(true);
                val    = convertArgs(val, _fld.getType(), destFld.getType());
                isNull = _fld.isNull() || val == null;
                break;

            case ConstInterface.ARG_TYPE_EXP:
                val    = _exp.evaluate(destFld.getType(), destFld.getSize());
                isNull = (val == null);
                if (isNull)
                {
                    val = getEmptyValue((destFld.getType() == StorageAttribute.BLOB ||
                                         destFld.getType() == StorageAttribute.BLOB_VECTOR));
                }
                break;

            case ConstInterface.ARG_TYPE_VALUE:
                val    = convertArgs(_val, _valueAttr, destFld.getType());
                isNull = _valueIsNull || val == null;
                break;

            default:
                return;
            }

            // Update destination field's _isNULL with the value from record. This is needed to identify
            // if the variable is modified.
            destFld.takeValFromRec();

            destFld.setValueAndStartRecompute(val, isNull, ((Task)destFld.getTask()).DataViewWasRetrieved, false, true);
        }