本文整理汇总了C#中Newtonsoft.Json.Linq.JObject.DecValueStrict方法的典型用法代码示例。如果您正苦于以下问题:C# JObject.DecValueStrict方法的具体用法?C# JObject.DecValueStrict怎么用?C# JObject.DecValueStrict使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Newtonsoft.Json.Linq.JObject
的用法示例。
在下文中一共展示了JObject.DecValueStrict方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Feedback
internal Feedback(JObject obj)
{
if (obj == null)
throw new ArgumentNullException("obj");
CommentForTranslator = obj.Value<string>("for_translator");
Rating = (Stars)(int)obj.DecValueStrict("rating");
}
示例2: AccountBalance
internal AccountBalance(JObject obj)
{
if (obj == null)
throw new ArgumentNullException("obj");
Credits = obj.DecValueStrict("credits");
Currency = obj.Value<string>("currency");
}
示例3: AccountStats
internal AccountStats(JObject obj)
{
if (obj == null)
throw new ArgumentNullException("obj");
CreditsSpent = obj.DecValueStrict("credits_spent");
Currency = obj.Value<string>("currency");
UserSince = obj.DateValueStrict("user_since");
}
示例4: LanguagePair
internal LanguagePair(JObject obj)
{
if (obj == null)
throw new ArgumentNullException("obj");
FromLanguage = obj.Value<string>("lc_src");
ToLanguage = obj.Value<string>("lc_tgt");
Tier = obj.Value<string>("tier").ToTranslationTier();
Currency = obj.Value<string>("currency");
UnitPrice = obj.DecValueStrict("unit_price");
}
示例5: Order
internal Order(JObject obj)
{
if (obj == null)
throw new ArgumentNullException("obj");
OrderId = obj.IntValueStrict("order_id");
Currency = obj.Value<string>("currency");
TotalCredits = obj.DecValueStrict("total_credits");
TotalUnits = obj.IntValueStrict("total_units");
UseSameTranslator = obj.BoolValueStrict("as_group");
QueuedJobs = obj.IntValueStrict("jobs_queued");
TotalJobs = obj.IntValueStrict("total_jobs");
AvailableJobs = obj.ReadIntArrayAsRoList("jobs_available");
PendingJobs = obj.ReadIntArrayAsRoList("jobs_pending");
ReviewableJobs = obj.ReadIntArrayAsRoList("jobs_reviewable");
ApprovedJobs = obj.ReadIntArrayAsRoList("jobs_approved");
RevisingJobs = obj.ReadIntArrayAsRoList("jobs_revising");
}
示例6: Quote
internal Quote(JObject obj)
{
if (obj == null) throw new ArgumentNullException("obj");
UnitCount = obj.IntValueStrict("unit_count");
Credits = obj.DecValueStrict("credits");
Currency = obj.Value<string>("currency");
SourceLanguage = obj.Value<string>("lc_src");
CustomData = obj.Value<string>("custom_data");
Eta = obj.TsValueStrict("eta");
JobType = obj.Value<string>("type").ToJobType();
}