本文整理汇总了C#中Vertex.HasAttribute方法的典型用法代码示例。如果您正苦于以下问题:C# Vertex.HasAttribute方法的具体用法?C# Vertex.HasAttribute怎么用?C# Vertex.HasAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vertex
的用法示例。
在下文中一共展示了Vertex.HasAttribute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EvaluateHaving
private Exceptional<Boolean> EvaluateHaving(Vertex myDBObjectReadoutGroup, AExpressionDefinition complexValue, out String attributeName, out ValueDefinition simpleValue, DBContext dbContext)
{
//GraphDBType graphDBType = null;
attributeName = null;
simpleValue = null;
if (complexValue is IDChainDefinition)
{
if (((IDChainDefinition)complexValue).LastAttribute == null)
{
if (((IDChainDefinition)complexValue).Last() is ChainPartFuncDefinition)
{
var func = (((IDChainDefinition)complexValue).Last() as ChainPartFuncDefinition);
if (func.Parameters.Count != 1)
return new Exceptional<Boolean>(new Error_NotImplemented(new System.Diagnostics.StackTrace(true)));
attributeName = func.SourceParsedString;
//graphDBType = func.Parameters.First().LastAttribute.GetDBType(dbContext.DBTypeManager);
}
else if (((IDChainDefinition)complexValue).IsUndefinedAttribute)
{
attributeName = ((IDChainDefinition)complexValue).UndefinedAttribute;
//return new Exceptional<bool>(new Error_NotImplemented(new System.Diagnostics.StackTrace(true)));
}
else
{
//return new Exceptional<bool>(new Error_NotImplemented(new System.Diagnostics.StackTrace(true)));
}
}
else
{
attributeName = ((IDChainDefinition)complexValue).LastAttribute.Name;
//graphDBType = ((IDChainDefinition)complexValue).LastAttribute.GetDBType(dbContext.DBTypeManager);
}
}
else
{
if (complexValue is AggregateDefinition)
{
var func = (complexValue as AggregateDefinition);
if (func.ChainPartAggregateDefinition.Parameters.Count != 1)
return new Exceptional<Boolean>(new Error_NotImplemented(new System.Diagnostics.StackTrace(true)));
attributeName = func.ChainPartAggregateDefinition.SourceParsedString;
//graphDBType = func.ContainingIDNodes.First().LastAttribute.GetDBType(dbContext.DBTypeManager);
}
else
{
return new Exceptional<bool>(new Error_NotImplemented(new System.Diagnostics.StackTrace(true)));
}
}
if (myDBObjectReadoutGroup.HasAttribute(attributeName))
{
ADBBaseObject objectValue = GraphDBTypeMapper.GetBaseObjectFromCSharpType(myDBObjectReadoutGroup.ObsoleteAttributes[attributeName]);
simpleValue = new ValueDefinition(objectValue);
return new Exceptional<bool>(true);
}
return new Exceptional<bool>(false);
}