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


C# JsonObject.GetInt32方法代码示例

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


在下文中一共展示了JsonObject.GetInt32方法的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

        public static GitHubCommitFile Parse(JsonObject obj) {
            
            if (obj == null) return null;

            // Parse the file status
            GitHubCommitFileStatus status;
            string strStatus = obj.GetString("status");
            switch (strStatus) {
                case "added": status = GitHubCommitFileStatus.Added; break;
                case "modified": status = GitHubCommitFileStatus.Modified; break;
                case "renamed": status = GitHubCommitFileStatus.Renamed; break;
                case "removed": status = GitHubCommitFileStatus.Removed; break;
                default: throw new Exception("Unknown status \"\" - please create an issue it can be fixed https://github.com/abjerner/Skybrud.Social/issues/new");
            }

            return new GitHubCommitFile(obj) {
                Filename = obj.GetString("filename"),
                Additions = obj.GetInt32("additions"),
                Deletions = obj.GetInt32("deletions"),
                Changes = obj.GetInt32("changes"),
                Status = status,
                RawUrl = obj.GetString("raw_url"),
                BlobUrl = obj.GetString("blob_url"),
                Patch = obj.GetString("patch")
            };
        
        }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:27,代码来源:GitHubCommitFile.cs

示例3: Parse

 /// <summary>
 /// Gets an instance of <code>YouTubePageInfo</code> from the specified <code>JsonObject</code>.
 /// </summary>
 /// <param name="obj">The instance of <code>JsonObject</code> to parse.</param>
 public static YouTubePageInfo Parse(JsonObject obj) {
     if (obj == null) return null;
     return new YouTubePageInfo(obj) {
         TotalResults = obj.GetInt32("totalResults"),
         ResultsPerPage = obj.GetInt32("resultsPerPage")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:11,代码来源:YouTubePageInfo.cs

示例4: Parse

 public static YouTubeVideoThumbnail Parse(JsonObject obj) {
     if (obj == null) return null;
     return new YouTubeVideoThumbnail(obj) {
         Url = obj.GetString("url"),
         Width = obj.GetInt32("width"),
         Height = obj.GetInt32("height")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:8,代码来源:YouTubeVideoThumbnail.cs

示例5: Parse

 public static GitHubCommitStats Parse(JsonObject obj) {
     if (obj == null) return null;
     return new GitHubCommitStats(obj) {
         Additions = obj.GetInt32("additions"),
         Deletions = obj.GetInt32("deletions"),
         Total = obj.GetInt32("total")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:8,代码来源:GitHubCommitStats.cs

示例6: Parse

 public static InstagramMediaSummary Parse(JsonObject obj) {
     if (obj == null) return new InstagramMediaSummary(null);
     return new InstagramMediaSummary(obj) {
         Url = obj.GetString("url"),
         Width = obj.GetInt32("width"),
         Height = obj.GetInt32("height")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:8,代码来源:InstagramMediaSummary.cs

示例7: Parse

 public static VimeoThumbnail Parse(JsonObject obj) {
     if (obj == null) return null;
     return new VimeoThumbnail(obj) {
         Width = obj.GetInt32("width"),
         Height = obj.GetInt32("height"),
         Url = obj.GetString("_content")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:8,代码来源:VimeoThumbnail.cs

示例8: Parse

 public static BitBucketCommitsCollection Parse(JsonObject obj) {
     if (obj == null) return null;
     return new BitBucketCommitsCollection(obj) {
         PageLength = obj.GetInt32("pagelen"),
         Values = obj.GetArray("values", BitBucketCommit.Parse),
         Page = obj.GetInt32("page"),
         Next = obj.GetString("next")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:9,代码来源:BitBucketCommitsCollection.cs

示例9: Parse

 public static BitBucketRepositoriesCollection Parse(JsonObject obj) {
     if (obj == null) return null;
     return new BitBucketRepositoriesCollection(obj) {
         PageLength = obj.GetInt32("pagelen"),
         Values = obj.GetArray("values", BitBucketRepository.Parse),
         Page = obj.GetInt32("page"),
         Size = obj.GetInt32("size")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:9,代码来源:BitBucketRepositoriesCollection.cs

示例10: Parse

 /// <summary>
 /// Parses the specified <code>JsonObject</code> into an instance of <code>FacebookCoverPhoto</code>.
 /// </summary>
 /// <param name="obj">The instance of <code>JsonObject</code> to be parsed.</param>
 public static FacebookCoverPhoto Parse(JsonObject obj) {
     if (obj == null) return null;
     return new FacebookCoverPhoto(obj) {
         Id = obj.GetString("id"),
         Source = obj.GetString("source"),
         OffsetY = obj.GetInt32("offset_y"),
         OffsetX = obj.GetInt32("offset_x")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:13,代码来源:FacebookCoverPhoto.cs

示例11: Parse

 public static FacebookMessageTag Parse(JsonObject obj) {
     if (obj == null) return null;
     return new FacebookMessageTag(obj) {
         Id = obj.GetString("id"),
         Name = obj.GetString("name"),
         Type = obj.GetString("type"),
         Offset = obj.GetInt32("offset"),
         Length = obj.GetInt32("length")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:10,代码来源:FacebookMessageTag.cs

示例12: Parse

 /// <summary>
 /// Gets a user from the specified <var>JsonObject</var>.
 /// </summary>
 /// <param name="obj">The instance of <var>JsonObject</var> to parse.</param>
 public static AnalyticsRealtimeDataQuery Parse(JsonObject obj) {
     if (obj == null) return null;
     return new AnalyticsRealtimeDataQuery {
         Ids = obj.GetString("ids"),
         StartIndex = obj.GetInt32("start-index"),
         MaxResults = obj.GetInt32("max-results"),
         Dimensions = obj.GetString("dimensions"),
         Metrics = obj.GetArray<string>("metrics")
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:14,代码来源:AnalyticsRealtimeDataQuery.cs

示例13: Parse

 /// <summary>
 /// Gets an instance of <code>AnalyticsAccountsResponseBody</code> from the specified <code>JsonObject</code>.
 /// </summary>
 /// <param name="obj">The instance of <code>JsonObject</code> to parse.</param>
 public static AnalyticsAccountsResponseBody Parse(JsonObject obj) {
     if (obj == null) return null;
     return new AnalyticsAccountsResponseBody(obj) {
         Kind = obj.GetString("kind"),
         Username = obj.GetString("username"),
         TotalResults = obj.GetInt32("totalResults"),
         StartIndex = obj.GetInt32("startIndex"),
         ItemsPerPage = obj.GetInt32("itemsPerPage"),
         Items = obj.GetArray("items", AnalyticsAccount.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:15,代码来源:AnalyticsAccountsResponseBody.cs

示例14: Parse

 /// <summary>
 /// Gets an instance of <code>AnalyticsProfilesResponseBody</code> from the specified <code>JsonObject</code>.
 /// </summary>
 /// <param name="obj">The instance of <code>JsonObject</code> to parse.</param>
 public static AnalyticsProfilesResponseBody Parse(JsonObject obj) {
     if (obj == null) return null;
     return new AnalyticsProfilesResponseBody(obj) {
         Kind = obj.GetString("kind"),
         Username = obj.GetString("username"),
         TotalResults = obj.GetInt32("totalResults"),
         StartIndex = obj.GetInt32("startIndex"),
         ItemsPerPage = obj.GetInt32("itemsPerPage"),
         PreviousLink = obj.GetString("previousLink"),
         NextLink = obj.GetString("nextLink"),
         Items = obj.GetArray("items", AnalyticsProfile.Parse)
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:17,代码来源:AnalyticsProfilesResponseBody.cs

示例15: Parse

 public static FacebookComments Parse(JsonObject obj) {
     if (obj == null) return new FacebookComments(null) { Data = new FacebookCommentSummary[0] };
     return new FacebookComments(obj) {
         Count = obj.GetInt32("count"),
         Data = obj.GetArray("data", FacebookCommentSummary.Parse) ?? new FacebookCommentSummary[0]
     };
 }
开发者ID:EmilMoe,项目名称:Skybrud.Social,代码行数:7,代码来源:FacebookComments.cs


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