Esempio n. 1
0
        public virtual void Execute()
        {
            IUploadExecuter executer = MediaFrameworkContext.GetUploadExecuter(ID.Parse(this.properties[Constants.Upload.AccountTemplateId]));

            if (executer != null)
            {
                executer.Upload(this.properties, this.bytes);
            }
        }
Esempio n. 2
0
        public Account(Item accountItem, bool selected)
        {
            this.ID   = accountItem.ID.Guid;
            this.Name = accountItem.Name;
            this.AccountTemplateId = accountItem.TemplateID.Guid;

            this.Selected = selected;

            var uploadExecuter = MediaFrameworkContext.GetUploadExecuter(accountItem);

            if (uploadExecuter != null)
            {
                this.Extensions    = new List <string>(uploadExecuter.FileExtensions);
                this.SupportCancel = uploadExecuter.SupportCanceling;
            }
            else
            {
                this.Extensions    = new List <string>();
                this.SupportCancel = true;
            }
        }
Esempio n. 3
0
 protected virtual bool CheckAccount(Guid accountTemplateId)
 {
     return(MediaFrameworkContext.GetUploadExecuter(new ID(accountTemplateId)) != null);
 }