Example #1
0
        /// <summary>
        /// Builds the proxy assembly.
        /// </summary>
        /// <param name="codeFiles">The code files.</param>
        /// <param name="jarInformationFile">The jar information file.</param>
        /// <param name="workFolder">The work folder.</param>
        /// <returns></returns>
        public ExecutionResult BuildProxyAssembly(Dictionary <string, StringBuilder> codeFiles, string jarInformationFile, string workFolder)
        {
            var retval = ExecutionResult.Empty;

            // Let's check arguments prior processing code snippets to build proxy assembly
            if (codeFiles?.Count > 0 && !string.IsNullOrEmpty(jarInformationFile) && !string.IsNullOrEmpty(workFolder))
            {
                try {
                    // If everything is Ok, we'll fire an event to perform registration
                    if ((retval = BuildProxyAssemblyHelper(codeFiles, workFolder, jarInformationFile)).IsSuccess)
                    {
                        _messenger.BroadcastNotification(retval.Tag.ToString(), this);
                    }
                } catch (Exception e) {
                    retval.LastExceptionIfAny = e;
                }
            }
            else
            {
                retval.LastExceptionIfAny = new ArgumentException("Arguments are missing or incorrect. Unable to continue.");
            }

            return(retval);
        }