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


C# JsonObject.GetInt方法代码示例

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


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

示例1: Parse

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

示例2: Parse

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

示例3: Parse

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

示例4: Parse

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

示例5: Parse

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

示例6: Parse

 public static VimeoTag Parse(JsonObject obj) {
     if (obj == null) return null;
     return new VimeoTag {
         Id = obj.GetInt("id"),
         Author = obj.GetInt("author"),
         Normalized = obj.GetString("normalized"),
         Url = obj.GetString("url"),
         Content = obj.GetString("_content")
     };
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:10,代码来源:VimeoTag.cs

示例7: 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.GetInt("start-index"),
         MaxResults = obj.GetInt("max-results"),
         Dimensions = obj.GetString("dimensions"),
         Metrics = obj.GetArray<string>("metrics")
     };
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:14,代码来源:AnalyticsRealtimeDataQuery.cs

示例8: Parse

        public static FacebookException Parse(JsonObject obj) {

            return new FacebookException(
                obj.GetInt("code"),
                obj.GetString("type"),
                obj.GetString("message"),
                obj.HasValue("error_subcode") ? obj.GetInt("error_subcode") : 0
            );

        }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:10,代码来源:FacebookException.cs

示例9: 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

示例10: Parse

 public static VimeoVideo Parse(JsonObject obj) {
     if (obj == null) return null;
     return new VimeoVideo {
         Id = obj.GetInt("id"),
         Title = obj.GetString("title"),
         Description = obj.GetString("description"),
         Url = obj.GetString("url"),
         UploadedDate = obj.GetDateTime("upload_date"),
         Duration = TimeSpan.FromSeconds(obj.GetInt("duration")),
         Width = obj.GetInt("width"),
         Height = obj.GetInt("height"),
         Tags = obj.GetArray("tags").Cast<string>()
     };
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:14,代码来源:VimeoVideo.cs

示例11: Parse

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

示例12: Parse

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

示例13: MonthlyInfo

 internal MonthlyInfo(JsonObject jo)
 {
     this.year	= jo.GetShort("year");
     this.month = jo.GetByte("month");
     this.count = jo.GetInt("tweet_count");
     this.path	= jo.GetString("file_name");
 }
开发者ID:RyuaNerin,项目名称:TwitterArchiveViewer,代码行数:7,代码来源:MonthlyInfo.cs

示例14: Parse

 public static GoogleAccessTokenResponse Parse(JsonObject obj) {
     return new GoogleAccessTokenResponse {
         AccessToken = obj.GetString("access_token"),
         RefreshToken = obj.GetString("refresh_token"),
         ExpiresIn = TimeSpan.FromSeconds(obj.GetInt("expires_in")),
         TokenType = obj.GetString("token_type")
     };
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:8,代码来源:GoogleAccessTokenResponse.cs

示例15: Parse

 public static VimeoCastMember Parse(JsonObject obj) {
     if (obj == null) return null;
     return new VimeoCastMember {
         Id = obj.GetInt("id"),
         Username = obj.GetString("username"),
         DisplayName = obj.GetString("display_name"),
         Role = obj.GetString("role")
     };
 }
开发者ID:jesperordrup,项目名称:Skybrud.Social,代码行数:9,代码来源:VimeoCastMember.cs


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