当前位置: 首页>>代码示例>>C#>>正文


C# ITweet类代码示例

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


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

示例1: Map

 public static AnalyzeTweet Map(ITweet tweet, string track)
 {
     return new AnalyzeTweet
     {
         Tweet = MapTweet(tweet, track)
     };
 }
开发者ID:adamralph,项目名称:HashBus,代码行数:7,代码来源:TweetMapper.cs

示例2: MarkTweetAsReadCommand

 public MarkTweetAsReadCommand(ITweet tweet, ITweetSink tweetSink)
 {
     _tweet = tweet;
     _tweetSink = tweetSink;
     _observer = new PropertyObserver<ITweet>(_tweet).
         RegisterHandler(x => x.IsRead, 
                         x => CanExecuteChanged(this, EventArgs.Empty));
 }
开发者ID:GraemeF,项目名称:Twiddler,代码行数:8,代码来源:MarkTweetAsReadCommand.cs

示例3: SerializableTweet

 public SerializableTweet(ITweet tweet)
 {
     this.Creator = tweet.Creator.Name;
     this.CreatedAt = tweet.CreatedAt;
     this.IsRetweet = tweet.IsRetweet;
     this.Language = tweet.Language.ToString();
     this.Retweeted = tweet.Retweeted;
     this.Text = tweet.Text;
 }
开发者ID:juvchan,项目名称:AzureDataLake,代码行数:9,代码来源:SerializableTweet.cs

示例4: Add

 public void Add(ITweet tweet)
 {
     lock (_mutex)
         using (IDocumentSession session = _documentStore.OpenSession())
         {
             session.Store(tweet);
             session.SaveChanges();
         }
 }
开发者ID:GraemeF,项目名称:Twiddler,代码行数:9,代码来源:TwitterDocumentStore.cs

示例5: PublishTweet

        // Publish Tweet
        public string PublishTweet(ITweet tweet)
        {
            if (tweet == null)
            {
                throw new ArgumentException("Tweet cannot be null");
            }

            return PublishTweet(tweet.TweetDTO);
        }
开发者ID:Murtaza-libs,项目名称:tweetinvi,代码行数:10,代码来源:TweetJsonController.cs

示例6: Map

 public static TweetReceived Map(ITweet tweet, string track, string endpointName, Guid sessionId)
 {
     return new TweetReceived
     {
         EndpointName = endpointName,
         SessionId = sessionId,
         Tweet = Map(tweet, track)
     };
 }
开发者ID:pgermishuys,项目名称:HashBus,代码行数:9,代码来源:TweetMapper.cs

示例7: SearchRepliesTo

        public IEnumerable<ITweet> SearchRepliesTo(ITweet tweet, bool recursiveReplies)
        {
            if (tweet == null)
            {
                throw new ArgumentException("Tweet cannot be null");
            }

            var repliesDTO = _searchQueryExecutor.SearchRepliesTo(tweet.TweetDTO, recursiveReplies);
            return _tweetFactory.GenerateTweetsFromDTO(repliesDTO);
        }
开发者ID:SowaLabs,项目名称:Tweetinvi-obsolete,代码行数:10,代码来源:SearchController.cs

示例8: TweetRating

        public TweetRating(IAuthorizer client, ITweet tweet)
        {
            _client = client;
            _tweet = tweet;

            _observer = new PropertyObserver<IAuthorizer>(_client).
                RegisterHandler(x => x.AuthenticatedUser,
                                x => UpdateIsMention());
            UpdateIsMention();
        }
开发者ID:GraemeF,项目名称:Twiddler,代码行数:10,代码来源:TweetRating.cs

示例9: FormatTweet

 static string FormatTweet(ITweet tweet)
 {
     var builder = new StringBuilder();
     builder.AppendLine(string.Format("{0} (@{1}) - {2}",
                        tweet.CreatedBy.Name,
                        tweet.CreatedBy.ScreenName,
                        tweet.CreatedAt.ToLocalTime().ToString("MM/dd/yy h:mm:ss tt")));
     builder.AppendLine(tweet.Text);
     return builder.ToString();
 }
开发者ID:nerdshark,项目名称:TwitterConsole,代码行数:10,代码来源:Program.cs

示例10: PublishTweetInReplyTo

        // Publish Tweet InReplyTo
        public bool PublishTweetInReplyTo(ITweet tweetToPublish, ITweet tweetToReplyTo)
        {
            if (tweetToPublish == null || tweetToReplyTo == null)
            {
                throw new ArgumentException("Tweet cannot be null!");
            }

            var publishedTweetDTO = PublishTweetDTOInReplyTo(tweetToPublish.TweetDTO, tweetToReplyTo.TweetDTO);
            UpdateTweetIfTweetSuccessfullyBeenPublished(tweetToPublish, publishedTweetDTO);

            return tweetToPublish.IsTweetPublished;
        }
开发者ID:Murtaza-libs,项目名称:tweetinvi,代码行数:13,代码来源:TweetController.cs

示例11: FollowUserIfRequired

 public void FollowUserIfRequired(ITweet tweet)
 {
     if (FollowWords.Any(word => tweet.Text.IndexOf(word, StringComparison.OrdinalIgnoreCase) > -1))
     {
         try
         {
             User.GetLoggedUser().FollowUser(tweet.CreatedBy.Id);
         }
         catch (Exception)
         {
             // Ignore exceptions.
         }
     }
 }
开发者ID:jeroenpot,项目名称:JeroenOnAzure,代码行数:14,代码来源:TwitterRepository.cs

示例12: InviTweetToPTTweet

 private static FSTweet InviTweetToPTTweet(ITweet t)
 {
     FSTweet ptTweet = new FSTweet();
     if (t.Coordinates != null)
     {
         ptTweet.Coordinates = t.Coordinates.Longitude.ToString() + ","
             + t.Coordinates.Latitude.ToString();
     }
     ptTweet.CreatedOn = t.CreatedAt;
     ptTweet.Id = t.Id.ToString();
     ptTweet.ReplyToId = t.InReplyToUserIdStr;
     ptTweet.Text = t.Text;
     return ptTweet;
 }
开发者ID:anytimecnc,项目名称:ProjectTeddy,代码行数:14,代码来源:HadoopSeeder.cs

示例13: PublishTweet

        public bool PublishTweet(ITweet tweet, IPublishTweetOptionalParameters optionalParameters = null)
        {
            if (tweet == null)
            {
                throw new ArgumentException("Tweet cannot be null!");
            }

            var parameters = new PublishTweetParameters(tweet.Text, optionalParameters);
            var tweetDTO = InternalPublishTweet(parameters);

            UpdateTweetIfTweetSuccessfullyBeenPublished(tweet, tweetDTO);

            return tweet.IsTweetPublished;
        }
开发者ID:rudiv,项目名称:tweetinvi,代码行数:14,代码来源:TweetController.cs

示例14: InsereRC

        private void InsereRC(ref Nodo N, ITweet value)
        {
            if (N == null)
                {
                    Nodo novoNodo = new Nodo(value);
                    N = novoNodo;
                }
                else if (value.CreatedAt < N.valor.CreatedAt) // menor vai pra esquerda
                    InsereRC(ref N.esquerda, value);
                else //if (value >= N.valor) // maior ou igual vai pra direita
                    InsereRC(ref N.direita, value);

                return;
        }
开发者ID:KyoZeus,项目名称:BuscaLogo,代码行数:14,代码来源:ArvoreBinaria.cs

示例15: GetTweetMatchingSearchIDs

        // find IDs of the search queries that correspond to the streamed tweet
        private List<string> GetTweetMatchingSearchIDs(ITweet tweet, string streamQueryID, List<ArrayList<ArrayList<QueryToken>>> searchTokens, List<string> searchQueryIDs)
        {
            List<int> matchingIdx = CompareStreamToSearchIDs(streamQueryID, searchQueryIDs);
            List<ArrayList<ArrayList<QueryToken>>> matchingSearchTokens = searchTokens.Where((x, idx) => matchingIdx.Contains(idx)).ToList();
           
            List<int> matchingIDsIndeces = new List<int>();
            foreach (var queryTokens in matchingSearchTokens.Select((value, idx) => new {idx, value}))
                if (IsMatch(tweet, queryTokens.value))
                    matchingIDsIndeces.Add(queryTokens.idx);

            matchingIdx = matchingIdx.Where((x, idx) => matchingIDsIndeces.Contains(idx)).ToList();
            List<string> matchingIDs = searchQueryIDs.Where((x, idx) => matchingIdx.Contains(idx)).ToList();

            return matchingIDs;
        }
开发者ID:SowaLabs,项目名称:TwitterStreamingDacq,代码行数:16,代码来源:StreamToSearchAssigner.cs


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