public async Task OnOperationExecutingAsyncInvokesConventionMethod() { var api = new ExecuteApi(serviceProvider); var testClass = new ConventionBasedOperationFilter(typeof(ExecuteApi)); var context = new OperationContext( api, s => new object(), "Test", true, null); var cancellationToken = CancellationToken.None; await testClass.OnOperationExecutingAsync(context, cancellationToken); api.InvocationCount.Should().Be(1); }
/// <summary> /// Creates a client to work with VK API methods. /// </summary> public CitrinaClient() { AuthHelper = new AuthHelper(); Execute = new ExecuteApi(); Account = new AccountApi(); Ads = new AdsApi(); Apps = new AppsApi(); Auth = new AuthApi(); Board = new BoardApi(); Database = new DatabaseApi(); Docs = new DocsApi(); Fave = new FaveApi(); Friends = new FriendsApi(); Gifts = new GiftsApi(); Groups = new GroupsApi(); Leads = new LeadsApi(); Likes = new LikesApi(); Market = new MarketApi(); Messages = new MessagesApi(); Newsfeed = new NewsfeedApi(); Notes = new NotesApi(); Notifications = new NotificationsApi(); Orders = new OrdersApi(); Pages = new PagesApi(); Photos = new PhotosApi(); Places = new PlacesApi(); Polls = new PollsApi(); Search = new SearchApi(); Secure = new SecureApi(); Stats = new StatsApi(); Status = new StatusApi(); Storage = new StorageApi(); Users = new UsersApi(); Utils = new UtilsApi(); Video = new VideoApi(); Wall = new WallApi(); Widgets = new WidgetsApi(); }
public void Init() { instance = new ExecuteApi(); }