Пример #1
0
 /// <summary>
 ///   remove DNObjectsCollection entries made by dot net parameters for the event
 /// </summary>
 internal void removeDotNetArgs()
 {
     // free the object table entry
     for (int i = 0; i < _argList.getSize(); i++)
     {
         string val = _argList.getArg(i).getValue(StorageAttribute.DOTNET, 0);
         DNManager.getInstance().DNObjectsCollection.Remove(BlobType.getKey(val));
     }
 }
Пример #2
0
        /// <summary>
        /// update changes in called task to fields in arguments from calling task
        /// </summary>
        /// <param name="task"></param>
        /// <param name="args"></param>
        internal override void UpdateArguments(Task task, ArgumentsList args)
        {
            FieldsTable fieldsTable = task.DataView.GetFieldsTab() as FieldsTable;

            int  numberOfArguments = (args != null) ? args.getSize() : 0;
            int  currentArgIndex   = 0; // index of currently handled argument
            bool taskHasParameters = ((DataView)task.DataView).ParametersExist();

            if (numberOfArguments > 0)
            {
                int dvPos  = ((DataView)task.DataView).GetRecordMainIdx();
                int dvSize = ((DataView)task.DataView).GetRecordMainSize();

                // Go over the fields, find the fields which had arguments set to
                for (int i = dvPos; (i < dvSize) && (currentArgIndex < numberOfArguments); i++)
                {
                    Field field = fieldsTable.getField(i) as Field;

                    if (!field.IsForArgument(taskHasParameters))
                    {
                        continue;
                    }

                    // get the argument
                    Argument arg = args.getArg(currentArgIndex);
                    currentArgIndex++;

                    // ignore skipped arguments
                    if (arg.skipArg())
                    {
                        continue;
                    }

                    // ignore arguments which are not fields
                    Field argField = arg.getField();
                    if (argField == null)
                    {
                        continue;
                    }

                    SetArgumentToField(field, argField);
                }
            }
        }