本文整理汇总了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);
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}