Пример #1
0
        protected override bool EndExecute(AsyncCodeActivityContext context,
                                           IAsyncResult result)
        {
            var asyncExecute = context.UserState as AsyncExecuteWMIDelegate;

            if (asyncExecute == null)
            {
                return(false);
            }
            var wmiResult = asyncExecute.EndInvoke(result);

            context.SetValue(Results, wmiResult ?? new List <Dictionary <string, object> >());
            return(wmiResult != null);
        }
        protected override async Task <Action <AsyncCodeActivityContext> > ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
        {
            // Inputs
            var gridid   = GridID.Get(context);
            var rowindex = RowIndex.Get(context);
            var columnid = ColumnID.Get(context);

            ///////////////////////////
            // Add execution logic HERE
            SAPAuto objSAPAuto = new SAPAuto();

            context.SetValue(CellValue, objSAPAuto.Grid_GetCellValue(gridid, rowindex, columnid));
            ///////////////////////////

            // Outputs
            return((ctx) => {
                CellValue.Set(ctx, null);
            });
        }
Пример #3
0
 protected override void EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
 {
     context.SetValue(响应消息, (result as Task <HttpResponseMessage>).Result);
 }
 protected override void EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
 {
     context.SetValue(数据, (result as Task <string>).Result);
 }