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


C# JsonObject.GetDateTime方法代码示例

本文整理汇总了C#中JsonObject.GetDateTime方法的典型用法代码示例。如果您正苦于以下问题:C# JsonObject.GetDateTime方法的具体用法?C# JsonObject.GetDateTime怎么用?C# JsonObject.GetDateTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JsonObject的用法示例。


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

示例1: Parse

 public static GitHubOrganization Parse(JsonObject obj) {
     if (obj == null) return null;
     return new GitHubOrganization(obj) {
         Login = obj.GetString("login"),
         Id = obj.GetInt32("id"),
         Url = obj.GetString("url"),
         ReposUrl = obj.GetString("repos_url"),
         EventsUrl = obj.GetString("events_url"),
         MembersUrl = obj.GetString("members_url"),
         PublicMembersUrl = obj.GetString("public_members_url"),
         AvatarUrl = obj.GetString("avatar_url"),
         Name = obj.GetString("name"),
         Company = obj.GetString("company"),
         Blog = obj.GetString("blog"),
         Location = obj.GetString("location"),
         Email = obj.GetString("email"),
         PublicRepos = obj.GetInt32("public_repos"),
         PublicGists = obj.GetInt32("public_gists"),
         Followers = obj.GetInt32("followers"),
         Following = obj.GetInt32("following"),
         HtmlUrl = obj.GetString("html_url"),
         CreatedAt = obj.GetDateTime("created_at"),
         UpdatedAt = obj.GetDateTime("updated_at")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:25,代码来源:GitHubOrganization.cs

示例2: Parse

 /// <summary>
 /// Gets a post from the specified <var>JsonObject</var>.
 /// </summary>
 /// <param name="obj">The instance of <var>JsonObject</var> to parse.</param>
 public static FacebookPost Parse(JsonObject obj) {
     if (obj == null) return null;
     return new FacebookPost(obj) {
         Id = obj.GetString("id"),
         From = obj.GetObject("from", FacebookObject.Parse),
         Application = obj.GetObject("application", FacebookObject.Parse),
         Properties = obj.GetArray("properties", FacebookPostProperties.Parse) ?? new FacebookPostProperties[0],
         Caption = obj.GetString("caption"),
         Message = obj.GetString("message"),
         Description = obj.GetString("description"),
         Story = obj.GetString("story"),
         Picture = obj.GetString("picture"),
         Link = obj.GetString("link"),
         Source = obj.GetString("source"),
         Name = obj.GetString("name"),
         Icon = obj.GetString("icon"),
         Type = obj.GetString("type"),
         StatusType = obj.GetString("status_type"),
         ObjectId = obj.GetString("object_id"),
         CreatedTime = obj.GetDateTime("created_time"),
         UpdatedTime = obj.GetDateTime("updated_time"),
         Shares = obj.GetObject("shares", FacebookShares.Parse),
         Likes = obj.GetObject("likes", FacebookLikes.Parse),
         Comments = obj.GetObject("comments", FacebookComments.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:30,代码来源:FacebookPost.cs

示例3: Parse

 /// <summary>
 /// Gets an account from the specified <code>JsonObject</code>.
 /// </summary>
 /// <param name="obj">The instance of <code>JsonObject</code> to parse.</param>
 public static AnalyticsAccount Parse(JsonObject obj) {
     return new AnalyticsAccount(obj) {
         Id = obj.GetString("id"),
         Name = obj.GetString("name"),
         Permissions = obj.GetObject("permissions", AnalyticsPermissions.Parse),
         Created = obj.GetDateTime("created"),
         Updated = obj.GetDateTime("updated")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:13,代码来源:AnalyticsAccount.cs

示例4: Parse

 public static FacebookEventSummary Parse(JsonObject obj) {
     return new FacebookEventSummary {
         Id = obj.GetLong("id"),
         Name = obj.GetString("name"),
         StartTime = obj.GetDateTime("start_time"),
         EndTime = obj.HasValue("end_time") ? (DateTime?) obj.GetDateTime("end_time") : null,
         TimeZone = obj.GetString("timezone"),
         Location = obj.GetString("location")
     };
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:10,代码来源:FacebookEventSummary.cs

示例5: Parse

 public static AnalyticsWebProperty Parse(JsonObject obj) {
     return new AnalyticsWebProperty {
         Id = obj.GetString("id"),
         AccountId = obj.GetString("accountId"),
         InternalWebPropertyId = obj.GetString("internalWebPropertyId"),
         Name = obj.GetString("name"),
         WebsiteUrl = obj.GetString("websiteUrl"),
         Level = obj.GetString("level"),
         Created = obj.GetDateTime("created"),
         Updated = obj.GetDateTime("updated")
     };
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:12,代码来源:AnalyticsWebProperty.cs

示例6: Parse

 public static FacebookEvent Parse(JsonObject obj) {
     return new FacebookEvent {
         Id = obj.GetLong("id"),
         Name = obj.GetString("name"),
         Description = obj.GetString("description"),
         StartTime = obj.GetDateTime("start_time"),
         EndTime = obj.HasValue("end_time") ? (DateTime?) obj.GetDateTime("end_time") : null,
         TimeZone = obj.GetString("timezone"),
         IsDateOnly = obj.HasValue("is_date_only") && obj.GetBoolean("is_date_only"),
         Location = obj.GetString("location"),
         Privacy = obj.GetString("privacy"),
         UpdatedTime = obj.GetDateTime("updated_time")
     };
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:14,代码来源:FacebookEvent.cs

示例7: Parse

 public static FacebookPhoto Parse(JsonObject obj) {
     if (obj == null) return null;
     return new FacebookPhoto {
         Id = obj.GetLong("id"),
         Name = obj.GetString("name"),
         Width = obj.GetInt("width"),
         Height = obj.GetInt("height"),
         Picture = obj.GetString("picture"),
         Source = obj.GetString("source"),
         Created = obj.GetDateTime("created_time"),
         Updated = obj.GetDateTime("updated_time"),
         Images = FacebookImage.ParseMultiple(obj.GetArray("images"))
     };
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:14,代码来源:FacebookPhoto.cs

示例8: Parse

        /// <summary>
        /// Gets an instance of <code>YouTubeVideoSnippet</code> from the specified <code>JsonObject</code>.
        /// </summary>
        /// <param name="obj">The instance of <code>JsonObject</code> to parse.</param>
        public static YouTubeVideoSnippet Parse(JsonObject obj) {
            
            // Check whether "obj" is NULL
            if (obj == null) return null;

            // Parse the "liveBroadcastContent" property
            YouTubeVideoLiveBroadcastContent broadcast;
            string strBroadcast = obj.GetString("liveBroadcastContent");
            if (!Enum.TryParse(strBroadcast, true, out broadcast)) {
                throw new Exception("Unknown value for liveBroadcastContent \"" + strBroadcast + "\" - please create an issue so it can be fixed https://github.com/abjerner/Skybrud.Social/issues/new");
            }

            // Get the array of tags (may not be present)
            JsonArray tags = obj.GetArray("tags");
            
            // Initialize the snippet object
            YouTubeVideoSnippet snippet = new YouTubeVideoSnippet(obj) {
                PublishedAt = obj.GetDateTime("publishedAt"),
                ChannelId = obj.GetString("channelId"),
                Title = obj.GetString("title"),
                Description = obj.GetString("description"),
                Thumbnails = obj.GetObject("thumbnails", YouTubeVideoThumbnails.Parse),
                ChannelTitle = obj.GetString("channelTitle"),
                Tags = tags == null ? new string[0] : obj.GetArray("tags").Cast<string>(),
                CategoryId = obj.GetString("categoryId"),
                LiveBroadcastContent = broadcast
            };

            return snippet;

        }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:35,代码来源:YouTubeVideoSnippet.cs

示例9: Parse

 public static GitHubCommitAuthor Parse(JsonObject obj) {
     if (obj == null) return null;
     return new GitHubCommitAuthor(obj) {
         Name = obj.GetString("name"),
         Email = obj.GetString("email"),
         Date = obj.GetDateTime("date")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:8,代码来源:GitHubCommitAuthor.cs

示例10: Parse

 /// <summary>
 /// Gets an instance of <code>YouTubeChannelSnippet</code> from the specified <code>JsonObject</code>.
 /// </summary>
 /// <param name="obj">The instance of <code>JsonObject</code> to parse.</param>
 public static YouTubeChannelSnippet Parse(JsonObject obj) {
     if (obj == null) return null;
     return new YouTubeChannelSnippet(obj) {
         Title = obj.GetString("title"),
         Description = obj.GetString("description"),
         PublishedAt = obj.GetDateTime("publishedAt"),
         Thumbnails = obj.GetObject("thumbnails", YouTubeChannelThumbnails.Parse),
         Localized = obj.GetObject("localized", YouTubeChannelLocalized.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:14,代码来源:YouTubeChannelSnippet.cs

示例11: Parse

 public static FacebookCommentSummary Parse(JsonObject obj) {
     return new FacebookCommentSummary {
         Id = obj.GetString("id"),
         From = obj.GetObject("from", FacebookObject.Parse),
         Message = obj.GetString("message"),
         MessageTags = obj.GetArray("message_tags", FacebookMessageTag.Parse),
         CreatedTime = obj.GetDateTime("created_time"),
         Likes = obj.HasValue("likes") ? obj.GetInt("likes") : 0
     };
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:10,代码来源:FacebookCommentSummary.cs

示例12: Parse

 /// <summary>
 /// Gets an instance of <code>YouTubePlaylistSnippet</code> from the specified <code>JsonObject</code>.
 /// </summary>
 /// <param name="obj">The instance of <code>JsonObject</code> to parse.</param>
 public static YouTubePlaylistSnippet Parse(JsonObject obj) {
     if (obj == null) return null;
     return new YouTubePlaylistSnippet(obj) {
         ChannelId = obj.GetString("channelId"),
         ChannelTitle = obj.GetString("channelTitle"),
         PublishedAt = obj.GetDateTime("publishedAt"),
         Title = obj.GetString("title"),
         Description = obj.GetString("description")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:14,代码来源:YouTubePlaylistSnippet.cs

示例13: Parse

 public static FacebookCommentSummary Parse(JsonObject obj) {
     // TODO: Should we just return NULL if "obj" is NULL?
     if (obj == null) return null;
     return new FacebookCommentSummary(obj) {
         Id = obj.GetString("id"),
         From = obj.GetObject("from", FacebookObject.Parse),
         Message = obj.GetString("message"),
         MessageTags = obj.GetArray("message_tags", FacebookMessageTag.Parse),
         CreatedTime = obj.GetDateTime("created_time"),
         Likes = obj.HasValue("likes") ? obj.GetInt32("likes") : 0
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:12,代码来源:FacebookCommentSummary.cs

示例14: Parse

 public static FacebookFeedEntry Parse(JsonObject obj) {
     return new FacebookFeedEntry {
         Id = obj.GetString("id"),
         From = obj.GetObject("from", FacebookObject.Parse),
         Message = obj.GetString("message"),
         Description = obj.GetString("description"),
         Story = obj.GetString("story"),
         Picture = obj.GetString("picture"),
         Link = obj.GetString("link"),
         Name = obj.GetString("name"),
         Caption = obj.GetString("caption"),
         Icon = obj.GetString("icon"),
         Type = obj.GetString("type"),
         StatusType = obj.GetString("status_type"),
         Application = obj.GetObject("application", FacebookObject.Parse),
         CreatedTime = obj.GetDateTime("created_time"),
         UpdatedTime = obj.GetDateTime("updated_time"),
         Comments = obj.GetObject("comments", FacebookComments.Parse),
         Likes = obj.GetObject("likes", FacebookLikes.Parse),
     };
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:21,代码来源:FacebookFeedEntry.cs

示例15: Parse

 public static VimeoChannel Parse(JsonObject obj) {
     if (obj == null) return null;
     return new VimeoChannel(obj) {
         Id = obj.GetInt32("id"),
         IsFeatured = obj.GetString("is_featured") == "1",
         IsSponsored = obj.GetString("is_sponsored") == "1",
         IsSubscribed = obj.GetString("is_subscribed") == "1",
         Name = obj.GetString("name"),
         Description = obj.GetString("description"),
         CreatedOn = obj.GetDateTime("created_on"),
         ModifiedOn = obj.GetDateTime("modified_on"),
         TotalVideos = obj.GetInt32("total_videos"),
         TotalSubscribers = obj.GetInt32("total_subscribers"),
         LogoUrl = obj.GetString("logo_url"),
         BadgeUrl = obj.GetString("badge_url"),
         ThumbnailUrl = obj.GetString("thumbnail_url"),
         Url = obj.GetArray("url").GetString(0),
         Layout = obj.GetString("layout"),
         Theme = obj.GetString("theme"),
         Privacy = obj.GetString("privacy")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:22,代码来源:VimeoChannel.cs


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