public object TypedInterceptor <T>(Interception details) { T result = default(T); Task task = dataStore.RunTransaction(async() => { result = await(Task <T>) details.Invoke(details.Target, details.Args); }); return(task.ContinueWith(_ => result)); }