Пример #1
0
        /// <summary>
        /// Save the record into Dictionary
        /// </summary>
        /// <param name="result"></param>
        public static void SaveRecordtoDictionary(IWorkItemResult wir)
        {
            // Check RTQC return value
            // Since the return value can only be one, the current solution is
            // to use KEYVALUEPAIR to store the return value plus the records
            if (((KeyValuePair <dynamic, bool>)wir.Result).Value)
            {
                recordDictionaryManager.SaveRecord(false,
                                                   ((KeyValuePair <dynamic, bool>)wir.Result).Key);
            }
            //WorkItem workItem = (WorkItem)result;

            //if ((bool)workItem.OutputParameters)
            //{
            //    recordDictionaryManager.SaveRecord(false,
            //                    workItem.InputParameters);
            //}
            //else
            //{
            //    recordDictionaryManager.SaveRecord(true,
            //                    workItem.InputParameters);
            //}

            // Debugging function
            DiReCTCore.PrintDictionary(null);
        }
Пример #2
0
        /// <summary>
        /// Save the record into Dictionary
        /// </summary>
        /// <param name="result"></param>
        static void SaveRecordtoDictionary(IAsyncResult result)
        {
            WorkItem workItem = (WorkItem)result;

            if ((bool)workItem.OutputParameters)
            {
                recordDictionaryManager.SaveRecord(false,
                                                   workItem.InputParameters);
            }
            else
            {
                recordDictionaryManager.SaveRecord(true,
                                                   workItem.InputParameters);
            }


            DiReCTCore.PrintDictionary(null);
        }