public async Task Subscribe(ResizeService service,
                             ResizeOptions options)
 {
     SubscriptionId = await service.Subscribe((x) => ActualSize = x, options);
 }
        private async Task CheckSubscriptionOptions(ResizeOptions expectedOptions)
        {
            SetupJsMockForSubscription(expectedOptions);

            var subscriptionId = await _service.Subscribe((BrowserWindowSize size) => { });

            subscriptionId.Should().NotBe(Guid.Empty);

            _jsruntimeMock.Verify();
        }
Esempio n. 3
0
 /// <summary>
 /// OnInitialized 方法
 /// </summary>
 protected override void OnInitialized()
 {
     ResizeService.Subscribe(this, OnResize);
 }