當前位置: 首頁>>代碼示例>>C#>>正文


C# JObject.DecValueStrict方法代碼示例

本文整理匯總了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");
        }
開發者ID:romansharin,項目名稱:gengo-dotnet,代碼行數:8,代碼來源:Feedback.cs

示例2: AccountBalance

        internal AccountBalance(JObject obj)
        {
            if (obj == null)
                throw new ArgumentNullException("obj");

            Credits = obj.DecValueStrict("credits");
            Currency = obj.Value<string>("currency");
        }
開發者ID:romansharin,項目名稱:gengo-dotnet,代碼行數:8,代碼來源:AccountBalance.cs

示例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");
        }
開發者ID:romansharin,項目名稱:gengo-dotnet,代碼行數:9,代碼來源:AccountStats.cs

示例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");
        }
開發者ID:romansharin,項目名稱:gengo-dotnet,代碼行數:11,代碼來源:LanguagePair.cs

示例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");
        }
開發者ID:kevinkuszyk,項目名稱:gengo-dotnet,代碼行數:22,代碼來源:Order.cs

示例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();
        }
開發者ID:romansharin,項目名稱:gengo-dotnet,代碼行數:14,代碼來源:Quote.cs


注:本文中的Newtonsoft.Json.Linq.JObject.DecValueStrict方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。