コード例 #1
0
        protected override void DoExecute(CodeActivityContext context)
        {
            var serviceAccounts = ServiceAccountRepository.ServiceAccounts();
            List <Models.ServiceAccountDTO> resultItems = new List <Models.ServiceAccountDTO>(serviceAccounts);

            result.Set(context, resultItems.ToArray());
        }
コード例 #2
0
ファイル: Download.cs プロジェクト: forki/synctoday2015
 protected override void Execute(CodeActivityContext context)
 {
     log.Debug(string.Format("Entered for '{0}'", ServiceAccount));
     try
     {
         Models.ServiceAccountDTO myServiceAccount = ServiceAccount.Get(context);
         log.Debug(string.Format("Would be called on '{0}'", myServiceAccount));
         ServiceAccountRepository.Download(myServiceAccount, null);
     }
     catch (Exception ex)
     {
         log.Fatal("failed", ex);
         throw;
     }
 }
コード例 #3
0
        protected override void DoExecute(CodeActivityContext context)
        {
            var adapter  = Adapter.Get(context);
            var consumer = Consumer.Get(context);
            var service  = Service.Get(context);

            devlog.Debug(String.Format("adapter: {2}/'{0}', consumer:{3}/'{1}', service:'{4}'", adapter, consumer, adapter == null ? string.Empty : adapter.Id.ToString(), consumer == null ? string.Empty : consumer.Id.ToString(), service));
            var serviceAccount = ServiceAccountRepository.ServiceAccountBAdapterAndConsumer(adapter, consumer, service);

            try
            {
                ServiceAccount.Set(context, serviceAccount.Value);
                devlog.Debug(String.Format("serviceAccount.Value: '{0}'", serviceAccount.Value));
            }
            catch (NullReferenceException)
            {
                ServiceAccount.Set(context, null);
                devlog.Debug("serviceAccount.Value: 'null'");
            }
        }