예제 #1
0
        public FollowManager(
            NiconicoSession niconicoSession,
            Provider.TagFollowProvider tagFollowProvider,
            Provider.MylistFollowProvider mylistFollowProvider,
            Provider.UserFollowProvider userFollowProvider,
            Provider.CommunityFollowProvider communityFollowProvider,
            Provider.ChannelFollowProvider channelFollowProvider
            )
        {
            NiconicoSession         = niconicoSession;
            TagFollowProvider       = tagFollowProvider;
            MylistFollowProvider    = mylistFollowProvider;
            UserFollowProvider      = userFollowProvider;
            CommunityFollowProvider = communityFollowProvider;
            ChannelFollowProvider   = channelFollowProvider;

            Tag       = new TagFollowInfoGroup(NiconicoSession, TagFollowProvider);
            Mylist    = new MylistFollowInfoGroup(NiconicoSession, MylistFollowProvider);
            User      = new UserFollowInfoGroup(NiconicoSession, UserFollowProvider);
            Community = new CommunityFollowInfoGroup(NiconicoSession, CommunityFollowProvider);
            Channel   = new ChannelFollowInfoGroup(NiconicoSession, ChannelFollowProvider);

            _FollowGroupsMap = new Dictionary <FollowItemType, IFollowInfoGroup>();

            _FollowGroupsMap.Add(FollowItemType.Tag, Tag);
            _FollowGroupsMap.Add(FollowItemType.Mylist, Mylist);
            _FollowGroupsMap.Add(FollowItemType.User, User);
            _FollowGroupsMap.Add(FollowItemType.Community, Community);
            _FollowGroupsMap.Add(FollowItemType.Channel, Channel);

            NiconicoSession.LogIn  += NiconicoSession_LogIn;
            NiconicoSession.LogOut += NiconicoSession_LogOut;
        }
예제 #2
0
 public TagFollowInfoGroup(
     NiconicoSession niconicoSession,
     Provider.TagFollowProvider tagFollowProvider
     )
 {
     NiconicoSession   = niconicoSession;
     TagFollowProvider = tagFollowProvider;
 }