本文整理汇总了C#中ITweetDTO类的典型用法代码示例。如果您正苦于以下问题:C# ITweetDTO类的具体用法?C# ITweetDTO怎么用?C# ITweetDTO使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITweetDTO类属于命名空间,在下文中一共展示了ITweetDTO类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PublishTweetDTOInReplyTo
private ITweetDTO PublishTweetDTOInReplyTo(ITweetDTO tweetToPublish, ITweetDTO tweetToReplyTo)
{
_uploadQueryExecutor.UploadTweetMediasBeforePublish(tweetToPublish);
var tweetDTO = _tweetQueryExecutor.PublishTweetInReplyTo(tweetToPublish, tweetToReplyTo);
return tweetDTO;
}
示例2: PublishTweetDTO
private ITweetDTO PublishTweetDTO(ITweetDTO tweetToPublish)
{
_uploadQueryExecutor.UploadTweetMediasBeforePublish(tweetToPublish);
var publishedTweetDTO = _tweetQueryExecutor.PublishTweet(tweetToPublish);
return publishedTweetDTO;
}
示例3: CanTweetDTOBePublished
public bool CanTweetDTOBePublished(ITweetDTO tweet)
{
if (tweet == null)
{
return false;
}
var tooManyMedia = tweet.MediasToPublish != null && tweet.MediasToPublish.Count > 4;
return !tweet.IsTweetPublished && !tweet.IsTweetDestroyed && !tooManyMedia;
}
示例4: GenerateTweetFromDTO
// Generate Tweet From DTO
public ITweet GenerateTweetFromDTO(ITweetDTO tweetDTO)
{
if (tweetDTO == null)
{
return null;
}
var parameterOverride = _tweetUnityFactory.GenerateParameterOverrideWrapper("tweetDTO", tweetDTO);
var tweet = _tweetUnityFactory.Create(parameterOverride);
return tweet;
}
示例5: SearchRepliesTo
public IEnumerable<ITweetDTO> SearchRepliesTo(ITweetDTO tweetDTO, bool recursiveReplies)
{
if (tweetDTO == null)
{
throw new ArgumentException("TweetDTO cannot be null");
}
var searchTweets = SearchTweets(string.Format(tweetDTO.CreatedBy.ScreenName)).ToList();
if (recursiveReplies)
{
return GetRecursiveReplies(searchTweets, tweetDTO.Id);
}
var repliesDTO = searchTweets.Where(x => x.InReplyToStatusId == tweetDTO.Id);
return repliesDTO;
}
示例6: GenerateTweetFromDTO
public static ITweet GenerateTweetFromDTO(ITweetDTO tweetDTO)
{
return TweetFactory.GenerateTweetFromDTO(tweetDTO);
}
示例7: Tweet
public Tweet(
ITweetDTO tweetDTO,
ITweetController tweetController,
ITweetFactory tweetFactory,
IUserFactory userFactory,
ITaskFactory taskFactory,
IFactory<IMedia> mediaFactory)
{
_tweetController = tweetController;
_tweetFactory = tweetFactory;
_userFactory = userFactory;
_taskFactory = taskFactory;
_mediaFactory = mediaFactory;
TweetDTO = tweetDTO;
}
示例8: UnFavouriteTweet
public string UnFavouriteTweet(ITweetDTO tweetDTO)
{
string query = _tweetQueryGenerator.GetUnFavouriteTweetQuery(tweetDTO);
return _twitterAccessor.ExecuteJsonPOSTQuery(query);
}
示例9: PublishRetweet
public static string PublishRetweet(ITweetDTO tweetDTO)
{
return TweetJsonController.PublishRetweet(tweetDTO);
}
示例10: GenerateMentionFromDTO
// Generate Mention from DTO
public IMention GenerateMentionFromDTO(ITweetDTO tweetDTO)
{
if (tweetDTO == null)
{
return null;
}
var parameterOverride = _mentionUnityFactory.GenerateParameterOverrideWrapper("tweetDTO", tweetDTO);
var mention = _mentionUnityFactory.Create(parameterOverride);
return mention;
}
示例11: UpdateTweetIfTweetSuccessfullyBeenPublished
// Update Tweet
public void UpdateTweetIfTweetSuccessfullyBeenPublished(ITweet sourceTweet, ITweetDTO publishedTweetDTO)
{
if (sourceTweet != null &&
publishedTweetDTO != null &&
publishedTweetDTO.IsTweetPublished)
{
sourceTweet.TweetDTO = publishedTweetDTO;
}
}
示例12: GenerateOEmbedTweet
public static string GenerateOEmbedTweet(ITweetDTO tweetDTO)
{
return TweetJsonController.GenerateOEmbedTweet(tweetDTO);
}
示例13: UnFavoriteTweet
public bool UnFavoriteTweet(ITweetDTO tweetDTO)
{
return _tweetQueryExecutor.UnFavouriteTweet(tweetDTO);
}
示例14: GenerateOEmbedTweet
public IOEmbedTweet GenerateOEmbedTweet(ITweetDTO tweetDTO)
{
var oembedTweetDTO = _tweetQueryExecutor.GenerateOEmbedTweet(tweetDTO);
return _tweetFactory.GenerateOEmbedTweetFromDTO(oembedTweetDTO);
}
示例15: FavoriteTweet
public bool FavoriteTweet(ITweetDTO tweetDTO)
{
if (tweetDTO == null)
{
return false;
}
// if the favourite operation failed the tweet should still be favourited if it previously was
tweetDTO.Favourited |= _tweetQueryExecutor.FavouriteTweet(tweetDTO);
return tweetDTO.Favourited;
}