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


C# XElement.ProcessChild方法代码示例

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


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

示例1: RecurlyTransactionError

 internal RecurlyTransactionError(XElement element)
 {
     element.ProcessChild("error_code", e => Code = e.Value);
     element.ProcessChild("error_category", e => Category = e.Value);
     element.ProcessChild("merchant_message", e => MerchantMessage = e.Value);
     element.ProcessChild("customer_message", e => CustomerMessage = e.Value);
 }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:7,代码来源:RecurlyTransactionError.cs

示例2: ReadElement

        protected override void ReadElement(XElement element)
        {
            base.ReadElement(element);

            element.ProcessChild(PayPalBillingAgreementIdElement, e =>
                    PayPalBillingAgreementId = e.Value);
        }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:7,代码来源:RecurlyPayPalBillingInfo.cs

示例3: ReadElement

 protected override void ReadElement(XElement element)
 {
     element.ProcessChild(Address1Element, e => Address1 = e.Value);
     element.ProcessChild(Address2Element, e => Address2 = e.Value);
     element.ProcessChild(CityElement, e => City = e.Value);
     element.ProcessChild(StateElement, e => State = e.Value);
     element.ProcessChild(ZipElement, e => Zip = e.Value);
     element.ProcessChild(CountryElement, e => Country = e.Value);
     element.ProcessChild(PhoneElement, e => Phone = e.Value);
 }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:10,代码来源:RecurlyAddress.cs

示例4: ReadElement

        protected override void ReadElement(XElement element)
        {
            element.ProcessChild(AddonCodeElement, e =>
                AddonCode = e.Value);

            element.ProcessChild(PlanCodeElement, e =>
                PlanCode = e.GetHrefLinkId());

            element.ProcessChild(NameElement, e =>
                Name = e.Value);

            element.ProcessChild(DisplayQuantityOnHostedPageElement, e =>
                DisplayQuantityOnHostedPage = e.ToBool());

            element.ProcessChild(DefaultQuantityElement, e =>
                DefaultQuantity = e.ToInt());

            element.ProcessChild(CreatedAtElement, e =>
                CreateAt = e.ToDateTime());

            element.ProcessChild(UnitAmountInCentsElement, e =>
                UnitAmountInCents.ReadElement(e));
        }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:23,代码来源:RecurlyPlanAddon.cs

示例5: ReadElement

 protected override void ReadElement(XElement element)
 {
     element.ProcessChild(AccountCodeElement,e => AccountCode = e.Value);
         element.ProcessChild(StateElement, e => State = e.ToEnum<AccountState>());
         element.ProcessChild(UsernameElement, e => Username = e.Value);
         element.ProcessChild(FirstNameElement, e => FirstName = e.Value);
         element.ProcessChild(LastNameElement, e => LastName = e.Value);
         element.ProcessChild(EmailElement, e => Email = e.Value);
         element.ProcessChild(CompanyNameElement, e => CompanyName = e.Value);
         element.ProcessChild(AcceptLanguageElement, e => AcceptLanguage = e.Value);
         element.ProcessChild(HostedLoginTokenElement, e => HostedLoginToken = e.Value);
         element.ProcessChild(CreatedAtElement, e => CreatedAt = e.ToDateTime());
         element.ProcessChild(RecurlyAddress.ElementName, e => Address = new RecurlyAddress(e));
 }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:14,代码来源:RecurlyAccount.cs

示例6: ReadElement

 protected override void ReadElement(XElement element)
 {
     element.ProcessChild(AccountCodeElement, e => AccountCode = e.GetHrefLinkId());
     element.ProcessChild(MessageElement, e => Message = e.Value);
     element.ProcessChild(CreatedAtElement, e => CreatedAt = e.ToDateTime());
 }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:6,代码来源:RecurlyAccountNote.cs

示例7: ReadElement

        protected override void ReadElement(XElement element)
        {
            base.ReadElement(element);

            element.ProcessChild(FirstSixElement, e =>
                FirstSix = e.Value);

            element.ProcessChild(LastFourElement, e =>
                LastFour = e.Value);

            element.ProcessChild(CardTypeElement, e =>
                CardType = e.Value);

            element.ProcessChild(ExpirationMonthElement, e =>
                ExpirationMonth = e.ToInt());

            element.ProcessChild(ExpirationYearElement, e =>
                ExpirationYear = e.ToInt());
        }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:19,代码来源:RecurlyCreditCardBillingInfo.cs

示例8: ReadElement

        protected override void ReadElement(XElement element)
        {
            element.ProcessChild(SingleUseElement, e =>
                SingleUse = e.ToBool());

            element.ProcessChild(TotalDiscountedInCentsElement, e =>
                TotalDiscountedInCents = e.ToInt());

            element.ProcessChild(CreatedAtElement, e =>
                CreatedAt = e.ToDateTime());

            element.ProcessChild(CouponCodeElement, e =>
                CouponCode = e.GetHrefLinkId());

            element.ProcessChild(AccountLinkElement, e =>
                AccountCode = e.GetHrefLinkId());

            element.ProcessChild(StateElement, e =>
                State = e.Value);
        }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:20,代码来源:RecurlyCouponRedemption.cs

示例9: ReadElement

        protected override void ReadElement(XElement element)
        {
            element.ProcessChild(AddonCodeElement, e =>
                AddonCode = e.Value);

            element.ProcessChild(UnitAmountInCentsElement, e =>
                UnitAmountInCents = e.ToInt());

            element.ProcessChild(QuantityElement, e =>
                Quantity = e.ToInt());
        }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:11,代码来源:RecurlySubscriptionAddon.cs

示例10: TransactionBillingInfo

                    internal TransactionBillingInfo(XElement element)
                    {
                        element.ProcessChild(FirstNameElement, e =>
                            FirstName = e.Value);

                        element.ProcessChild(LastNameElement, e =>
                            LastName = e.Value);

                        element.ProcessChild(Address1Element, e =>
                            Address1 = e.Value);

                        element.ProcessChild(Address2Element, e =>
                            Address2 = e.Value);

                        element.ProcessChild(CityElement, e =>
                            City = e.Value);

                        element.ProcessChild(StateElement, e =>
                            State = e.Value);

                        element.ProcessChild(ZipElement, e =>
                            Zip = e.Value);

                        element.ProcessChild(CountryElement, e =>
                            Country = e.Value);

                        element.ProcessChild(PhoneElement, e =>
                            Phone = e.Value);

                        element.ProcessChild(VatNumberElement, e =>
                            VatNumber = e.Value);

                        element.ProcessChild(FirstSixElement, e =>
                            FirstSix = e.Value);

                        element.ProcessChild(LastFourElement, e =>
                            LastFour = e.Value);

                        element.ProcessChild(CardTypeElement, e =>
                            CardType = e.Value);

                        element.ProcessChild(ExpirationMonthElement, e =>
                            ExpirationMonth = e.ToInt());

                        element.ProcessChild(ExpirationYearElement, e =>
                            ExpirationYear = e.ToInt());
                    }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:47,代码来源:RecurlyTransaction.cs

示例11: ReadElement

        protected override void ReadElement(XElement element)
        {
            element.ProcessChild(IdElement, e =>
                Id = e.Value);

            element.ProcessChild(StateElement, e =>
                State = e.ToEnum<InvoiceState>());

            element.ProcessChild(InvoiceNumberElement, e =>
                InvoiceNumber = e.ToInt());

            element.ProcessChild(PurchaseOrderNumberElement, e =>
                PurchaseOrderNumber = e.Value);

            element.ProcessChild(VatNumberElement, e =>
                VatNumber = e.Value);

            element.ProcessChild(SubTotalInCentsElement, e =>
                SubTotalInCents = e.ToInt());

            element.ProcessChild(TaxInCentsElement, e =>
                TaxInCents = e.ToInt());

            element.ProcessChild(TotalInCentsElement, e =>
                TotalInCents = e.ToInt());

            element.ProcessChild(CurrencyElement, e =>
                Currency = e.Value);

            element.ProcessChild(CreatedAtElement, e =>
                CreatedAt = e.ToDateTime());

            element.ProcessChild(AccountCodeElement, e =>
                AccountCode = e.Value.Split('/').Last());

            element.ProcessChild(TransactionsElement, ProcessTransactions);
        }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:37,代码来源:RecurlyInvoice.cs

示例12: TransactionAccount

                internal TransactionAccount(XElement element)
                {
                    element.ProcessChild(AccountCodeElement, e =>
                        AccountCode = e.Value);

                    element.ProcessChild(FirstNameElement, e =>
                        FirstName = e.Value);

                    element.ProcessChild(LastNameElement, e =>
                        LastName = e.Value);

                    element.ProcessChild(EmailElement, e =>
                        Email = e.Value);

                    element.ProcessChild(CompanyNameElement, e =>
                        CompanyName = e.Value);

                    element.ProcessChild(BillingInfoElement, e =>
                        BillingInfo = new TransactionBillingInfo(e));
                }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:20,代码来源:RecurlyTransaction.cs

示例13: TransactionDetails

 internal TransactionDetails(XElement element)
 {
     element.ProcessChild(AccountElement, e => Account = new TransactionAccount(e));
 }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:4,代码来源:RecurlyTransaction.cs

示例14: ReadElement

        protected override void ReadElement(XElement element)
        {
            element.ProcessChild(IdElement, e =>
                Id = e.Value);

            element.ProcessChild(AccountCodeElement, e =>
                AccountCode = e.GetHrefLinkId());

            element.ProcessChild(InvoiceNumberElement, e =>
                InvoiceNumber = e.GetHrefLinkId(int.Parse));

            element.ProcessChild(SubscriptionIdElement, e =>
                SubscriptionId = e.GetHrefLinkId());

            element.ProcessChild(ActionElement, e =>
                {
                    Action = e.Value;
                    Type = e.ToEnum<TransactionType>();
                });

            element.ProcessChild(AmountInCentsElement, e =>
                AmountInCents = e.ToInt());

            element.ProcessChild(TaxInCentsElement, e =>
                TaxInCents = e.ToInt());

            element.ProcessChild(CurrencyElement, e =>
                Currency = e.Value);

            element.ProcessChild(StatusElement, e =>
                Status = e.Value);

            element.ProcessChild(ReferenceElement, e =>
                Reference = e.Value);

            element.ProcessChild(TestElement, e =>
                Test = e.ToBool());

            element.ProcessChild(VoidableElement, e =>
                Voidable = e.ToBool());

            element.ProcessChild(RefundableElement, e =>
                Refundable = e.ToBool());

            element.ProcessChild(CvvResultElement, e =>
                {
                    CvvResultCode = e.Attribute("code").Value;
                    CvvResult = e.Value;
                });

            element.ProcessChild(AvsResultElement, e =>
                {
                    AvsResultCode = e.Attribute("code").Value;
                    AvsResult = e.Value;
                });

            element.ProcessChild(AvsResultStreetElement, e =>
                AvsResultStreet = e.Value);

            element.ProcessChild(AvsResultPostalElement, e =>
                AvsResultPostal = e.Value);

            element.ProcessChild(CreatedAtElement, e =>
                CreatedAt = e.ToDateTime());

            element.ProcessChild(TransactionErrorElement, e =>
                TransactionError = new RecurlyTransactionError(e));

            element.ProcessChild(TransactionDetailsElement, e =>
                Details = new TransactionDetails(e));
        }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:71,代码来源:RecurlyTransaction.cs

示例15: ReadElement

        protected override void ReadElement(XElement element)
        {
            element.ProcessChild(PlanCodeElement, e =>
                PlanCode = element.Value);

            element.ProcessChild(NameElement, e =>
                Name = element.Value);

            element.ProcessChild(DescriptionElement, e =>
                Description = element.Value);

            element.ProcessChild(SuccessUrlElement, e =>
                SuccessUrl = element.Value);

            element.ProcessChild(CancelUrlElement, e =>
                CancelUrl = element.Value);

            element.ProcessChild(DisplayDonationAmountsElement, e =>
                DisplayDonationAmounts = element.ToBool());

            element.ProcessChild(DisplayQuantityElement, e =>
                DisplayQuantity = element.ToBool());

            element.ProcessChild(DisplayPhoneNumberElement, e =>
                DisplayPhoneNumber = element.ToBool());

            element.ProcessChild(BypassHostedConfirmationElement, e =>
                BypassHostedConfirmation = element.ToBool());

            element.ProcessChild(UnitNameElement, e =>
                UnitName = element.Value);

            element.ProcessChild(PaymentPageTosLinkElement, e =>
                PaymentPageTosLink = element.Value);

            element.ProcessChild(PlanIntervalLengthElement, e =>
                PlanIntervalLength = element.ToInt());

            element.ProcessChild(PlanIntervalUnitElement, e =>
                PlanIntervalUnit = element.ToEnum<IntervalUnit>());

            element.ProcessChild(TrialIntervalLengthElement, e =>
                TrialIntervalLength = element.ToInt());

            element.ProcessChild(TrialIntervalUnitElement, e =>
                TrialIntervalUnit = element.ToEnum<IntervalUnit>());

            element.ProcessChild(AccountingCodeElement, e =>
                AccountingCode = element.Value);

            element.ProcessChild(CreatedAtElement, e =>
                CreatedAt = element.ToDateTime());

            element.ProcessChild(UnitAmountInCentsElement, e =>
                UnitAmountInCents.ReadElement(e));

            element.ProcessChild(SetupFeeInCentsElement, e =>
                SetupFeeInCents.ReadElement(e));
        }
开发者ID:ryanande,项目名称:recurly-client-net,代码行数:59,代码来源:RecurlyPlan.cs


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