Beispiel #1
0
        public static FollowContext <ItemType> Create(IFollowProvider <ItemType> provider, ItemType followable, bool followed)
        {
            var isFollowing = followed;

            return(new FollowContext <ItemType>(provider, followable, isFollowing));
        }
Beispiel #2
0
        public static async Task <FollowContext <ItemType> > CreateAsync(IFollowProvider <ItemType> provider, ItemType followable, bool?followed = null)
        {
            var isFollowing = followed ?? await provider.IsFollowingAsync(followable);

            return(new FollowContext <ItemType>(provider, followable, isFollowing));
        }