本文整理汇总了C#中IExpressionGraph.AddNodesWithComplexRelation方法的典型用法代码示例。如果您正苦于以下问题:C# IExpressionGraph.AddNodesWithComplexRelation方法的具体用法?C# IExpressionGraph.AddNodesWithComplexRelation怎么用?C# IExpressionGraph.AddNodesWithComplexRelation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IExpressionGraph
的用法示例。
在下文中一共展示了IExpressionGraph.AddNodesWithComplexRelation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MatchComplexData
//.........这里部分代码省略.........
leftValue = new ValueDefinition(leftType, leftDBObject.Value.GetAttribute(data.IDChainDefinitions.Item1.LastAttribute.UUID, data.IDChainDefinitions.Item1.LastAttribute.GetRelatedType(dbContext.DBTypeManager), dbContext));
if (data.IDChainDefinitions.Item2.LastAttribute.KindOfType == KindsOfType.SetOfReferences
|| data.IDChainDefinitions.Item2.LastAttribute.KindOfType == KindsOfType.ListOfNoneReferences || data.IDChainDefinitions.Item2.LastAttribute.KindOfType == KindsOfType.SetOfNoneReferences)
rightValue = new TupleDefinition(rightType, rightDBObject.Value.GetAttribute(data.IDChainDefinitions.Item2.LastAttribute.UUID), data.IDChainDefinitions.Item2.LastAttribute.GetDBType(dbContext.DBTypeManager));
else
rightValue = new ValueDefinition(rightType, rightDBObject.Value.GetAttribute(data.IDChainDefinitions.Item2.LastAttribute.UUID, data.IDChainDefinitions.Item2.LastAttribute.GetRelatedType(dbContext.DBTypeManager), dbContext));
var tempSimpleOperationResult = this.SimpleOperation(leftValue, rightValue, typeOfBinExpr);
if (tempSimpleOperationResult.Failed())
return new Exceptional<bool>(tempSimpleOperationResult);
var tempOperatorResult = tempSimpleOperationResult.Value;
if ((Boolean)(tempOperatorResult as ValueDefinition).Value.Value)
{
//found sth that is really true
#region insert into graph
switch (associativity)
{
case TypesOfAssociativity.Neutral:
case TypesOfAssociativity.Left:
IntegrateInGraph(leftDBObject.Value, result, leftLevelKey, dbContext, dbObjectCache);
break;
case TypesOfAssociativity.Right:
IntegrateInGraph(rightDBObject.Value, result, rightLevelKey, dbContext, dbObjectCache);
break;
case TypesOfAssociativity.Unknown:
if (Type == TypesOfOperators.AffectsLowerLevels)
{
result.AddNodesWithComplexRelation(leftDBObject, leftLevelKey, rightDBObject, rightLevelKey, dbObjectCache, 1);
}
else
{
result.AddNodesWithComplexRelation(leftDBObject, leftLevelKey, rightDBObject, rightLevelKey, dbObjectCache, 0);
}
break;
default:
return new Exceptional<bool>(new Error_NotImplemented(new System.Diagnostics.StackTrace(true)));
}
#endregion
}
}
}
}
#region clean lower levels
if (Type == TypesOfOperators.AffectsLowerLevels)
{
switch (associativity)
{
case TypesOfAssociativity.Neutral:
case TypesOfAssociativity.Left:
CleanLowerLevel(leftLevelKey, dbContext, dbObjectCache, result);
break;
case TypesOfAssociativity.Right:
CleanLowerLevel(rightLevelKey, dbContext, dbObjectCache, result);
break;
case TypesOfAssociativity.Unknown:
CleanLowerLevel(leftLevelKey, dbContext, dbObjectCache, result);
CleanLowerLevel(rightLevelKey, dbContext, dbObjectCache, result);
break;
default:
return new Exceptional<bool>(new Error_NotImplemented(new System.Diagnostics.StackTrace(true)));
}
}
#endregion
}
}
}
#endregion
break;
default:
return new Exceptional<bool>(new Error_NotImplemented(new System.Diagnostics.StackTrace(true)));
}
return new Exceptional<bool>(true);
}