protected override async Task <Action <AsyncCodeActivityContext> > ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken) { // Object Container: Use objectContainer.Get<T>() to retrieve objects from the scope var objectContainer = context.GetFromContext <IObjectContainer>(TwilioApiScope.ParentContainerPropertyTag); // Inputs var faxsid = FaxSid.Get(context); var cancelledFax = FaxWrappers.CancelFaxAsync(objectContainer.Get <ITwilioRestClient>(), faxsid); // Outputs return((ctx) => { Fax.Set(ctx, cancelledFax); }); }
protected override async Task <Action <AsyncCodeActivityContext> > ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken) { // Object Container: Use objectContainer.Get<T>() to retrieve objects from the scope var objectContainer = context.GetFromContext <IObjectContainer>(TwilioApiScope.ParentContainerPropertyTag); // Inputs var faxsid = FaxSid.Get(context); var faxmediasid = FaxMediaSid.Get(context); var deleted = await FaxMediaWrappers.DeleteFaxMediaAsync(objectContainer.Get <ITwilioRestClient>(), faxsid, faxmediasid); // Outputs return((ctx) => { Success.Set(ctx, deleted); }); }