Esempio n. 1
0
            public void Execute()
            {
                IExternalSource   extsource;
                ICommandEventArgs args = new ICommandEventArgs();

                //Unpack archive
                Components.Submission sub = null;
                try {
                    extsource = CreateSource(m_upfile);

                    //Create submission
                    sub = m_subda.Create(m_asstID, m_prinID, extsource);
                } catch (Exception er) {
                    args.Exception = er;
                }

                args.ReturnValue = sub;
                if (Finished != null)
                {
                    Finished(this, args);
                }
            }
Esempio n. 2
0
            public void Execute()
            {
                IExternalSource   extsrc;
                ICommandEventArgs args = new ICommandEventArgs();

                //Run CVS to get the files
                CVSTool cvs = new CVSTool();

                try {
                    extsrc = cvs.Checkout(m_cvsroot, m_module, m_password, out m_target);
                } catch (Exception er) {
                    args.Exception = er;
                    Finish(args); return;
                }

                //Sanity check on CVS
                if (extsrc == null)
                {
                    args.Exception = new ToolExecutionException("Failure during execution of CVS");
                    Finish(args); return;
                }

                //Create the submission
                Submissions subda = new Submissions(Globals.CurrentIdentity);

                Components.Submission sub = null;
                try {
                    sub = m_subda.Create(m_asstID, m_prinID, extsrc);
                } catch (Exception er) {
                    args.Exception = er;
                    Finish(args); return;
                }

                //Finish up
                args.ReturnValue = sub;
                Finish(args);
            }