本文整理汇总了C#中StarryEyes.Anomaly.TwitterApi.DataModels.TwitterStatus类的典型用法代码示例。如果您正苦于以下问题:C# TwitterStatus类的具体用法?C# TwitterStatus怎么用?C# TwitterStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TwitterStatus类属于StarryEyes.Anomaly.TwitterApi.DataModels命名空间,在下文中一共展示了TwitterStatus类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NotifyNewArrival
public void NotifyNewArrival(TwitterStatus status, NotificationType type, string explicitSoundSource)
{
if (!_proxy.NotifyNewArrival(status, type, explicitSoundSource))
{
Next?.NotifyNewArrival(status, type, explicitSoundSource);
}
}
示例2: RegisterStatus
public static void RegisterStatus(TwitterStatus status)
{
status.Entities
.Where(e => e.EntityType == EntityType.Hashtags)
.Select(e => e.DisplayText)
.ForEach(RegisterHashtag);
}
示例3: NotifyUnfavorited
public void NotifyUnfavorited(TwitterUser source, TwitterStatus status)
{
if (!_proxy.NotifyUnfavorited(source, status) && this.Next != null)
{
this.Next.NotifyUnfavorited(source, status);
}
}
示例4: NotifyReceived
public void NotifyReceived(TwitterStatus status)
{
if (!_proxy.NotifyReceived(status) && this.Next != null)
{
this.Next.NotifyReceived(status);
}
}
示例5: NotifyNewArrival
public void NotifyNewArrival(TwitterStatus status, NotificationType type, string explicitSoundSource)
{
if (!_proxy.NotifyNewArrival(status, type, explicitSoundSource) && this.Next != null)
{
this.Next.NotifyNewArrival(status, type, explicitSoundSource);
}
}
示例6: NotifyReceived
public virtual void NotifyReceived(TwitterStatus status)
{
if (Next != null)
{
Next.NotifyReceived(status);
}
}
示例7: NotifyDeleted
public void NotifyDeleted(long statusId, TwitterStatus deleted)
{
if (Next != null)
{
Next.NotifyDeleted(statusId, deleted);
}
}
示例8: NotifyRetweeted
public void NotifyRetweeted(TwitterUser source, TwitterStatus status)
{
if (Next != null)
{
Next.NotifyRetweeted(source, status);
}
}
示例9: NotifyRetweeted
public void NotifyRetweeted(TwitterUser source, TwitterStatus original, TwitterStatus retweet)
{
if (!_proxy.NotifyRetweeted(source, original, retweet) && this.Next != null)
{
this.Next.NotifyRetweeted(source, original, retweet);
}
}
示例10: StartAcceptNewArrival
internal static void StartAcceptNewArrival(TwitterStatus status)
{
lock (_acceptingArrivals)
{
_acceptingArrivals[status.Id] = new List<TabModel>();
}
}
示例11: NotifyFavorited
public void NotifyFavorited(TwitterUser source, TwitterStatus status)
{
if (!_proxy.NotifyFavorited(source, status))
{
Next?.NotifyFavorited(source, status);
}
}
示例12: EndAcceptNewArrival
internal static void EndAcceptNewArrival(TwitterStatus status)
{
List<TabModel> removal;
lock (_acceptingArrivals)
{
if (!_acceptingArrivals.TryGetValue(status.Id, out removal) || removal.Count == 0) return;
}
var soundSource = removal
.Select(t => t.NotifySoundSource)
.Where(s => !String.IsNullOrEmpty(s))
.Where(File.Exists)
.FirstOrDefault();
if (status.StatusType == StatusType.DirectMessage)
{
Task.Run(() => NotifyNewArrival(status, NotificationType.DirectMessage, soundSource));
}
else if (FilterSystemUtil.InReplyToUsers(status).Intersect(Setting.Accounts.Ids).Any())
{
Task.Run(() => NotifyNewArrival(status, NotificationType.Mention, soundSource));
}
else
{
Task.Run(() => NotifyNewArrival(status, NotificationType.Normal, soundSource));
}
}
示例13: NotifyRetweeted
public void NotifyRetweeted(TwitterUser source, TwitterStatus status)
{
if (_proxy.NotifyRetweeted(source, status) && this.Next != null)
{
this.Next.NotifyRetweeted(source, status);
}
}
示例14: TwitterStatus
public TwitterStatus(dynamic json)
{
this.GenerateFromJson = true;
this.Id = ((string)json.id_str).ParseLong();
this.CreatedAt = ((string)json.created_at).ParseDateTime(ParsingExtension.TwitterDateTimeFormat);
this.Text = ParsingExtension.ResolveEntity(json.text);
if (json.extended_entities())
{
this.Entities = Enumerable.ToArray(Enumerable.Concat(
TwitterEntity.GetEntities(json.entities),
TwitterEntity.GetEntities(json.extended_entities)));
}
else if (json.entities())
{
this.Entities = Enumerable.ToArray(TwitterEntity.GetEntities(json.entities));
}
else
{
this.Entities = new TwitterEntity[0];
}
if (json.recipient())
{
// THIS IS DIRECT MESSAGE!
this.StatusType = StatusType.DirectMessage;
this.User = new TwitterUser(json.sender);
this.Recipient = new TwitterUser(json.recipient);
}
else
{
this.StatusType = StatusType.Tweet;
this.User = new TwitterUser(json.user);
this.Source = json.source;
if (json.in_reply_to_status_id_str())
{
this.InReplyToStatusId = ((string)json.in_reply_to_status_id_str).ParseNullableId();
}
if (json.in_reply_to_user_id_str())
{
this.InReplyToUserId = ((string)json.in_reply_to_user_id_str).ParseNullableId();
}
if (json.in_reply_to_screen_name())
{
this.InReplyToScreenName = json.in_reply_to_screen_name;
}
if (json.retweeted_status())
{
var original = new TwitterStatus(json.retweeted_status);
this.RetweetedOriginal = original;
this.RetweetedOriginalId = original.Id;
// merge text and entities
this.Text = original.Text;
this.Entities = original.Entities.Guard().ToArray();
}
if (json.coordinates() && json.coordinates != null)
{
this.Longitude = (double)json.coordinates.coordinates[0];
this.Latitude = (double)json.coordinates.coordinates[1];
}
}
}
示例15: NotifyReceived
public void NotifyReceived(TwitterStatus status)
{
if (!_proxy.NotifyReceived(status))
{
Next?.NotifyReceived(status);
}
}