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


C# NodeIndex.GetElementsByType方法代码示例

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


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

示例1: Evaluate

        /// <summary>
        /// Evaluates this <see cref="Precondition"/> against the contents of the
        /// indicated <see cref="NodeIndex"/>.
        /// </summary>
        /// <param name="nodeIndex">The <see cref="NodeIndex"/> of a <see cref="XmlDocument"/></param>
        /// <param name="cache">A cache of previously evaluated precondition results.</param>
        /// <returns>A <see cref="bool"/> value indicating the applicability of this
        /// <see cref="Precondition"/> to the <see cref="XmlDocument"/>.</returns>
        public override bool Evaluate(NodeIndex nodeIndex, Dictionary<Precondition, bool> cache)
        {
            if (nodeIndex.HasTypeInformation) {
                string ns = FpMLRuleSet.DetermineNamespace (nodeIndex);

                foreach (string type in types) {
                    XmlNodeList list = nodeIndex.GetElementsByType (ns, type);

                    if ((list != null) && (list.Count > 0)) return (true);
                }
            }
            else {
                foreach (String element in elements) {
                    XmlNodeList list = nodeIndex.GetElementsByName (element);

                    if ((list != null) && (list.Count > 0)) return (true);
                }
            }
            return (false);
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:28,代码来源:ContentPrecondition.cs

示例2: Rule51

        // --------------------------------------------------------------------
        private static bool Rule51(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (Rule51 (name, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "FxSwapLeg"), errorHandler));

            return (
                      Rule51 (name, nodeIndex.GetElementsByName ("nearLeg"), errorHandler)
                    & Rule51 (name, nodeIndex.GetElementsByName ("farLeg"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:10,代码来源:FxRules.cs

示例3: Rule48

        // --------------------------------------------------------------------
        private static bool Rule48(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (Rule48 (name, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "FxAsianFeature"), errorHandler));

            return (
                      Rule48 (name, nodeIndex.GetElementsByName ("asian"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:9,代码来源:FxRules.cs

示例4: Rule25_OLD

        // --------------------------------------------------------------------
        private static bool Rule25_OLD(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (Rule25_OLD (name, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "Schedule"), errorHandler));

            return (
                  Rule25_OLD (name, nodeIndex.GetElementsByName ("feeRateSchedule"), errorHandler)
                & Rule25_OLD (name, nodeIndex.GetElementsByName ("floatingRateMultiplierSchedule"), errorHandler)
                & Rule25_OLD (name, nodeIndex.GetElementsByName ("spreadSchedule"), errorHandler)
                & Rule25_OLD (name, nodeIndex.GetElementsByName ("fixedRateSchedule"), errorHandler)
                & Rule25_OLD (name, nodeIndex.GetElementsByName ("capRateSchedule"), errorHandler)
                & Rule25_OLD (name, nodeIndex.GetElementsByName ("floorRateSchedule"), errorHandler)
                & Rule25_OLD (name, nodeIndex.GetElementsByName ("feeAmountSchedule"), errorHandler)
                & Rule25_OLD (name, nodeIndex.GetElementsByName ("knownAmountSchedule"), errorHandler)
                & Rule25_OLD (name, nodeIndex.GetElementsByName ("notionalStepSchedule"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:17,代码来源:IrdRules.cs

示例5: Rule02

        // --------------------------------------------------------------------
        private static bool Rule02(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (Rule02 (name, nodeIndex, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "PaymentCalculationPeriod"), errorHandler));

            return (Rule02 (name, nodeIndex, nodeIndex.GetElementsByName ("paymentCalculationPeriod"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:8,代码来源:PricingAndRiskRules.cs

示例6: Rule10

        // --------------------------------------------------------------------
        private static bool Rule10(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (
                      Rule10 (name, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "FacilityNotice"), errorHandler));

            return (
                      Rule10 (name, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "FacilityNotice"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:10,代码来源:LoanRules.cs

示例7: Rule01

        // --------------------------------------------------------------------
        private static bool Rule01(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (
                      Rule01 (name, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "LoanContract"), errorHandler));

            return (
                  Rule01 (name, nodeIndex.GetElementsByName ("loanContract"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:10,代码来源:LoanRules.cs

示例8: Rule09_OLD

        // --------------------------------------------------------------------
        private static bool Rule09_OLD(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (
                      Rule09_OLD (name, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "FXAverageRateObservationSchedule"), errorHandler)
                    & Rule09_OLD (name, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "FxAverageRateObservationSchedule"), errorHandler));

            return (
                  Rule09_OLD (name, nodeIndex.GetElementsByName ("averageRateObservationSchedule"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:11,代码来源:FxRules.cs

示例9: Rule09

        // --------------------------------------------------------------------
        private static bool Rule09(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (Rule01(name, nodeIndex.GetElementsByType(DetermineNamespace(nodeIndex), "InterestRateStream"), errorHandler));

            return (
                  Rule09 (name, nodeIndex.GetElementsByName ("swapStream"), errorHandler)
                & Rule09 (name, nodeIndex.GetElementsByName ("capFloorStream"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:10,代码来源:IrdRules.cs

示例10: Rule61

        // --------------------------------------------------------------------
        private static bool Rule61(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (Rule61 (name, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "NonNegativeSchedule"), errorHandler));

            return (
                  Rule61 (name, nodeIndex.GetElementsByName ("notionalStepSchedule"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:9,代码来源:IrdRules.cs

示例11: Rule49

        // --------------------------------------------------------------------
        private static bool Rule49(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (Rule47 (name, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "ResetFrequency"), errorHandler));

            return (Rule49 (name, nodeIndex.GetElementsByName ("resetFrequency"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:8,代码来源:IrdRules.cs

示例12: Rule47

        // --------------------------------------------------------------------
        private static bool Rule47(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (Rule47 (name, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "OptionalEarlyTermination"), errorHandler));

            return (Rule47 (name, nodeIndex.GetElementsByName ("optionalEarlyTermination"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:8,代码来源:IrdRules.cs

示例13: Rule44

        // --------------------------------------------------------------------
        private static bool Rule44(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (Rule44 (name, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "MandatoryEarlyTerminationAdjustedDates"), errorHandler));

            return (Rule44 (name, nodeIndex.GetElementsByName ("mandatoryEarlyTerminationAdjustedDates"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:8,代码来源:IrdRules.cs

示例14: Rule43

        // --------------------------------------------------------------------
        private static bool Rule43(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (Rule43 (name, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "FxLinkedNotionalAmount"), errorHandler));

            return (Rule43 (name, nodeIndex.GetElementsByName ("fxLinkedNotionalAmount"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:8,代码来源:IrdRules.cs

示例15: Rule26

        // --------------------------------------------------------------------
        private static bool Rule26(string name, NodeIndex nodeIndex, ValidationErrorHandler errorHandler)
        {
            if (nodeIndex.HasTypeInformation)
                return (Rule26 (name, nodeIndex, nodeIndex.GetElementsByType (DetermineNamespace (nodeIndex), "BusinessCentersReference"), errorHandler));

            return (
                  Rule26 (name, nodeIndex, nodeIndex.GetElementsByName ("businessCentersReference"), errorHandler));
        }
开发者ID:formicary,项目名称:fpml-toolkit-csharp,代码行数:9,代码来源:IrdRules.cs


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