本文整理匯總了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();
}