• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IUserIdentifier类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IUserIdentifier的典型用法代码示例。如果您正苦于以下问题:C# IUserIdentifier类的具体用法?C# IUserIdentifier怎么用?C# IUserIdentifier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IUserIdentifier类属于命名空间,在下文中一共展示了IUserIdentifier类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: UserTimelineQueryParameters

 public UserTimelineQueryParameters(
     IUserIdentifier userIdentifier,
     IUserTimelineParameters queryParameters)
 {
     UserIdentifier = userIdentifier;
     QueryParameters = queryParameters;
 }
开发者ID:Murtaza-libs,项目名称:tweetinvi,代码行数:7,代码来源:UserTimelineRequestQueryParameters.cs


示例2: GetUserTimeline

        // User Timeline
        public string GetUserTimeline(IUserIdentifier userIdentifier, int maximumNumberOfTweets = 40)
        {
            var requestParameters = _timelineQueryParameterGenerator.CreateUserTimelineParameters();
            requestParameters.MaximumNumberOfTweetsToRetrieve = maximumNumberOfTweets;

            return GetUserTimeline(userIdentifier, requestParameters);
        }
开发者ID:rudiv,项目名称:tweetinvi,代码行数:8,代码来源:TimelineJsonController.cs


示例3: GenerateParameterExpectedResult

        public static string GenerateParameterExpectedResult(IUserIdentifier userDTO, string idParameterName = "user_id", string screenNameParameterName = "screen_name")
        {
            if (userDTO.Id != TweetinviSettings.DEFAULT_ID)
            {
                return String.Format("{0}={1}", idParameterName, userDTO.GetHashCode());
            }

            return String.Format("{0}={1}", screenNameParameterName, userDTO.GetHashCode());
        }
开发者ID:SowaLabs,项目名称:Tweetinvi-obsolete,代码行数:9,代码来源:UserQueryGeneratorHelper.cs


示例4: GetUserTimeline

        public IEnumerable<ITweet> GetUserTimeline(IUserIdentifier userIdentifier, IUserTimelineParameters parameters)
        {
            if (parameters == null)
            {
                parameters = _timelineQueryParameterGenerator.CreateUserTimelineParameters();
            }

            var queryParameters = _timelineQueryParameterGenerator.CreateUserTimelineQueryParameters(userIdentifier, parameters);
            return GetUserTimline(queryParameters);
        }
开发者ID:Murtaza-libs,项目名称:tweetinvi,代码行数:10,代码来源:TimelineController.cs


示例5: GetUserSubscribedListsQuery

        // User Lists
        public string GetUserSubscribedListsQuery(IUserIdentifier userIdentifier, bool getOwnedListsFirst)
        {
            if (!_userQueryValidator.CanUserBeIdentified(userIdentifier))
            {
                return null;
            }

            var userIdParameter = _userQueryParameterGenerator.GenerateIdOrScreenNameParameter(userIdentifier);
            return GenerateUserListsQuery(userIdParameter, getOwnedListsFirst);
        }
开发者ID:Murtaza-libs,项目名称:tweetinvi,代码行数:11,代码来源:TwitterListQueryGenerator.cs


示例6: GetFollowerIdsQuery

        // Followers
        public string GetFollowerIdsQuery(IUserIdentifier userDTO, int maxFollowersToRetrieve)
        {
            if (!_userQueryValidator.CanUserBeIdentified(userDTO))
            {
                return null;
            }

            string userIdentifierParameter = _userQueryParameterGenerator.GenerateIdOrScreenNameParameter(userDTO);
            return GenerateGetFollowerIdsQuery(userIdentifierParameter, maxFollowersToRetrieve);
        }
开发者ID:SowaLabs,项目名称:Tweetinvi-obsolete,代码行数:11,代码来源:UserQueryGenerator.cs


示例7: GetRelationshipDetailsQuery

        // Get Existing Relationship
        public string GetRelationshipDetailsQuery(IUserIdentifier sourceUserIdentifier, IUserIdentifier targetUserIdentifier)
        {
            if (!_userQueryValidator.CanUserBeIdentified(sourceUserIdentifier) ||
                !_userQueryValidator.CanUserBeIdentified(targetUserIdentifier))
            {
                return null;
            }

            string sourceParameter = _userQueryParameterGenerator.GenerateIdOrScreenNameParameter(sourceUserIdentifier, "source_id", "source_screen_name");
            string targetParameter = _userQueryParameterGenerator.GenerateIdOrScreenNameParameter(targetUserIdentifier, "target_id", "target_screen_name");
            return string.Format(Resources.Friendship_GetRelationship, sourceParameter, targetParameter);
        }
开发者ID:SowaLabs,项目名称:Tweetinvi-obsolete,代码行数:13,代码来源:FriendshipQueryGenerator.cs


示例8: Initialize

        private void Initialize(string text, IUserIdentifier recipient)
        {
            if (string.IsNullOrEmpty(text))
            {
                throw new ArgumentNullException("Message Text cannot be null or empty.");
            }

            if (recipient == null)
            {
                throw new ArgumentNullException("Message recipient cannot be null.");
            }

            Text = text;
            Recipient = recipient;
        }
开发者ID:SowaLabs,项目名称:TweetinviNew,代码行数:15,代码来源:PublishMessageParameters.cs


示例9: Init

        private void Init()
        {
            _maximumNumberOfTweetsParameterValue = TestHelper.GenerateRandomInt();
            _fakeUserIdentifier = A.Fake<IUserIdentifier>();

            _fakeHomeTimelineParameters = A.Fake<IHomeTimelineParameters>();
            _fakeHomeTimelineParameters.CallsTo(x => x.MaximumNumberOfTweetsToRetrieve).Returns(_maximumNumberOfTweetsParameterValue);


            _fakeUserTimelineParameters = A.Fake<IUserTimelineParameters>();
            _fakeUserTimelineParameters.CallsTo(x => x.MaximumNumberOfTweetsToRetrieve).Returns(_maximumNumberOfTweetsParameterValue);
            
            _fakeUserTimelineQueryParameters = A.Fake<IUserTimelineQueryParameters>();
            _fakeUserTimelineQueryParameters.CallsTo(x => x.Parameters).Returns(_fakeUserTimelineParameters);
            _fakeUserTimelineQueryParameters.CallsTo(x => x.UserIdentifier).Returns(_fakeUserIdentifier);

            _fakeMentionsTimelineParameters = A.Fake<IMentionsTimelineParameters>();
            _fakeMentionsTimelineParameters.CallsTo(x => x.MaximumNumberOfTweetsToRetrieve).Returns(_maximumNumberOfTweetsParameterValue);

            _userIdentifierParameter = TestHelper.GenerateString();
            _includeRTSParameter = TestHelper.GenerateString();
            _excludeRepliesParameter = TestHelper.GenerateString();
            _includeContributorDetailsParameter = TestHelper.GenerateString();
            _maximumNumberOfTweetsParameter = TestHelper.GenerateString();
            _trimUserParameter = TestHelper.GenerateString();
            _sinceIdParameter = TestHelper.GenerateString();
            _maxIdParameter = TestHelper.GenerateString();
            _includeDetailsParameter = TestHelper.GenerateString();

            var queryParameterBuilder = new StringBuilder();
            
            queryParameterBuilder.Append(_includeContributorDetailsParameter);
            queryParameterBuilder.Append(_maximumNumberOfTweetsParameter);
            queryParameterBuilder.Append(_trimUserParameter);
            queryParameterBuilder.Append(_sinceIdParameter);
            queryParameterBuilder.Append(_maxIdParameter);
            queryParameterBuilder.Append(_includeDetailsParameter);

            var homeQueryParameter = _excludeRepliesParameter + queryParameterBuilder;
            var userQueryParameter = _userIdentifierParameter + _includeRTSParameter + _excludeRepliesParameter + queryParameterBuilder;

            _expectedTimelineQuery = String.Format(Resources.Timeline_GetHomeTimeline, homeQueryParameter);
            _expectedUserTimelineQuery = String.Format(Resources.Timeline_GetUserTimeline, userQueryParameter);
            _expectedMentionsTimelineQuery = String.Format(Resources.Timeline_GetMentionsTimeline, queryParameterBuilder);
        }
开发者ID:SowaLabs,项目名称:Tweetinvi-obsolete,代码行数:45,代码来源:TimelineQueryGeneratorTests.cs


示例10: Create

        public ITwitterListIdentifier Create(string slug, IUserIdentifier userIdentifier)
        {
            if (userIdentifier == null)
            {
                return null;
            }

            if (userIdentifier.Id != TweetinviSettings.DEFAULT_ID)
            {
                return Create(slug, userIdentifier.Id);
            }

            if (!string.IsNullOrEmpty(userIdentifier.ScreenName))
            {
                return Create(slug, userIdentifier.ScreenName);
            }

            return null;
        }
开发者ID:SowaLabs,项目名称:Tweetinvi-obsolete,代码行数:19,代码来源:TwitterListIdentifierFactory.cs


示例11: GenerateIdOrScreenNameParameter

        public string GenerateIdOrScreenNameParameter(
            IUserIdentifier userIdentifier,
            string idParameterName = "user_id",
            string screenNameParameterName = "screen_name")
        {
            if (userIdentifier == null)
            {
                throw new ArgumentException("Cannot extract id or name parameter from a null userIdentifier.");
            }

            if (!_userQueryValidator.CanUserBeIdentified(userIdentifier))
            {
                throw new ArgumentException("Cannot extract either id or name parameter from the given userIdentifier.");
            }

            if (_userQueryValidator.IsUserIdValid(userIdentifier.Id))
            {
                return GenerateUserIdParameter(userIdentifier.Id, idParameterName);
            }

            return GenerateScreenNameParameter(userIdentifier.ScreenName, screenNameParameterName);
        }
开发者ID:SowaLabs,项目名称:Tweetinvi-obsolete,代码行数:22,代码来源:UserQueryParameterGenerator.cs


示例12: UpdateRelationshipAuthorizationsWith

        // Update Relationship Authorization With

        /// <summary>
        /// Changes the authorizations you give to a specific user.
        /// </summary>
        public static bool UpdateRelationshipAuthorizationsWith(IUserIdentifier userIdentifier, bool retweetsEnabled, bool deviceNotifictionEnabled)
        {
            return FriendshipController.UpdateRelationshipAuthorizationsWith(userIdentifier, retweetsEnabled, deviceNotifictionEnabled);
        }
开发者ID:SowaLabs,项目名称:TweetinviNew,代码行数:9,代码来源:Account.cs


示例13: UnMuteUser

 /// <summary>
 /// Unmute a specific user.
 /// </summary>
 public static bool UnMuteUser(IUserIdentifier userIdentifier)
 {
     return AccountController.UnMuteUser(userIdentifier);
 }
开发者ID:SowaLabs,项目名称:TweetinviNew,代码行数:7,代码来源:Account.cs


示例14: CreateUserTimelineQueryParameters

        // Query Parameters
        public IUserTimelineQueryParameters CreateUserTimelineQueryParameters(IUserIdentifier userIdentifier, IUserTimelineParameters userTimelineParameters)
        {
            var userIdentifierParameter = TweetinviFactory.CreateConstructorParameter("userIdentifier", userIdentifier);
            var queryParameters = TweetinviFactory.CreateConstructorParameter("parameters", userTimelineParameters);

            return _userTimelineRequestQueryParameterFactory.Create(userIdentifierParameter, queryParameters);
        }
开发者ID:rudiv,项目名称:tweetinvi,代码行数:8,代码来源:TimelineQueryParameterGenerator.cs


示例15: CheckUserSubscriptionAsync

 public async Task<bool> CheckUserSubscriptionAsync(IUserIdentifier user)
 {
     return await _taskFactory.ExecuteTaskAsync(() => CheckUserSubscription(user));
 }
开发者ID:SowaLabs,项目名称:TweetinviNew,代码行数:4,代码来源:TwitterList.cs


示例16: CheckUserMembershipAsync

 public async Task<bool> CheckUserMembershipAsync(IUserIdentifier user)
 {
     return await _taskFactory.ExecuteTaskAsync(() => CheckUserMembership(user));
 }
开发者ID:SowaLabs,项目名称:TweetinviNew,代码行数:4,代码来源:TwitterList.cs


示例17: RemoveMemberAsync

 public async Task<bool> RemoveMemberAsync(IUserIdentifier user)
 {
     return await _taskFactory.ExecuteTaskAsync(() => RemoveMember(user));
 }
开发者ID:SowaLabs,项目名称:TweetinviNew,代码行数:4,代码来源:TwitterList.cs


示例18: GetFriends

 public IEnumerable<IUser> GetFriends(IUserIdentifier userDTO, int maxFriendsToRetrieve = 250)
 {
     var friendIds = GetFriendIds(userDTO, maxFriendsToRetrieve);
     return _userFactory.GetUsersFromIds(friendIds);
 }
开发者ID:Murtaza-libs,项目名称:tweetinvi,代码行数:5,代码来源:UserController.cs


示例19: UnBlockUser

 public bool UnBlockUser(IUserIdentifier userDTO)
 {
     return _userQueryExecutor.UnBlockUser(userDTO);
 }
开发者ID:Murtaza-libs,项目名称:tweetinvi,代码行数:4,代码来源:UserController.cs


示例20: GetFavouriteTweets

 public IEnumerable<ITweet> GetFavouriteTweets(IUserIdentifier userDTO, int maxFavouritesToRetrieve = 40)
 {
     var favoriteTweetsDTO = _userQueryExecutor.GetFavouriteTweets(userDTO, maxFavouritesToRetrieve);
     return _tweetFactory.GenerateTweetsFromDTO(favoriteTweetsDTO);
 }
开发者ID:Murtaza-libs,项目名称:tweetinvi,代码行数:5,代码来源:UserController.cs



注:本文中的IUserIdentifier类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IUserInfo类代码示例发布时间:2022-05-24
下一篇:
C# IUserDataManager类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap