Пример #1
0
        public async Task SomeAsync()
        {
            var source = AsyncMaybe <object> .SomeAsync(Task.FromResult(new object()));

            var isSome = await source.IsSome;

            Assert.True(isSome);
        }
Пример #2
0
        public async Task SomeAsync()
        {
            var result = await AsyncMaybe <int> .SomeAsync(Task.FromResult(134)).OrFail();

            Assert.Equal(134, result);
        }