Used to return the mapping view models ;)
Esempio n. 1
0
        /// <summary>
        /// Generates this instance.
        /// </summary>
        public MappingViewModelTO Generate()
        {
            var outputParser = DataListFactory.CreateOutputParser();
            var inputParser  = DataListFactory.CreateInputParser();

            var inputList = GenerateMapping(SavedInputMapping, ActivityInputDefinitions, false, inputParser);

            var outputList = GenerateMapping(SavedOutputMapping, ActivityOutputDefinitions, true, outputParser);

            MappingViewModelTO result = new MappingViewModelTO(inputList, outputList);

            // and set the data to save?!
            if (string.IsNullOrEmpty(SavedInputMapping))
            {
                SavedInputMapping = GetInputString(inputList);
            }

            if (string.IsNullOrEmpty(SavedOutputMapping))
            {
                SavedOutputMapping = GetOutputString(outputList);
            }

            return(result);
        }
        /// <summary>
        /// Generates this instance.
        /// </summary>
        public MappingViewModelTO Generate()
        {
            var outputParser = DataListFactory.CreateOutputParser();
            var inputParser = DataListFactory.CreateInputParser();

            var inputList = GenerateMapping(SavedInputMapping, ActivityInputDefinitions, false, inputParser);

            var outputList = GenerateMapping(SavedOutputMapping, ActivityOutputDefinitions, true, outputParser);

            MappingViewModelTO result = new MappingViewModelTO(inputList, outputList);

            // and set the data to save?!
            if(string.IsNullOrEmpty(SavedInputMapping))
            {
                SavedInputMapping = GetInputString(inputList);
            }

            if(string.IsNullOrEmpty(SavedOutputMapping))
            {
                SavedOutputMapping = GetOutputString(outputList);
            }

            return result;
        }