本文整理汇总了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")
};
}
示例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")
};
}
示例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")
};
}
示例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
};
}
示例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")
};
}
示例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")
};
}
示例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")
};
}
示例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
);
}
示例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"))
};
}
示例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>()
};
}
示例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]
};
}
示例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]
};
}
示例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");
}
示例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")
};
}
示例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")
};
}