本文整理汇总了C#中IVertexType.GetDescendantVertexTypes方法的典型用法代码示例。如果您正苦于以下问题:C# IVertexType.GetDescendantVertexTypes方法的具体用法?C# IVertexType.GetDescendantVertexTypes怎么用?C# IVertexType.GetDescendantVertexTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVertexType
的用法示例。
在下文中一共展示了IVertexType.GetDescendantVertexTypes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute_private
/// <summary>
/// Executes the query plan recursivly
/// </summary>
/// <param name="myVertexType">The starting vertex type</param>
/// <returns>An enumeration of vertices</returns>
private IEnumerable<IVertex> Execute_private(IVertexType myVertexType)
{
#region current type
ISonesIndex idx = null;
if (_expressionIndex != null)
idx = _indexManager.GetIndex(_expressionIndex, _securityToken, _transactionToken);
else
idx = GetBestMatchingIdx(_indexManager.GetIndices(_property.Property, _securityToken, _transactionToken));
foreach (var aVertex in GetValues(idx, _constant)
.Select(aId => _vertexStore.GetVertex(
_securityToken,
_transactionToken,
aId,
myVertexType.ID,
VertexEditionFilter,
VertexRevisionFilter)))
{
yield return aVertex;
}
#endregion
#region child types
foreach (var aChildVertexType in myVertexType.GetDescendantVertexTypes())
{
foreach (var aVertex in Execute_private(aChildVertexType))
{
yield return aVertex;
}
}
#endregion
yield break;
}
示例2: RemoveIndices
/// <summary>
/// Removes indices
/// </summary>
/// <param name="myToBeRemovedIndices"></param>
/// <param name="vertexType"></param>
/// <param name="myTransactionToken"></param>
/// <param name="mySecurityToken"></param>
private void RemoveIndices(Dictionary<string, string> myToBeRemovedIndices, IVertexType vertexType, TransactionToken myTransactionToken, SecurityToken mySecurityToken)
{
if (myToBeRemovedIndices.IsNotNullOrEmpty())
{
foreach (var aIndex in myToBeRemovedIndices)
{
//find the source
IIndexDefinition sourceIndexDefinition = vertexType.GetIndexDefinitions(false).Where(_ => _.Name == aIndex.Key && (aIndex.Value == null || _.Edition == aIndex.Value)).FirstOrDefault();
foreach (var aVertexType in vertexType.GetDescendantVertexTypes())
{
foreach (var aInnerIndex in aVertexType.GetIndexDefinitions(false).Where(_=>_.SourceIndex.ID == sourceIndexDefinition.ID))
{
_indexManager.RemoveIndexInstance(aInnerIndex.ID, myTransactionToken, mySecurityToken);
}
}
if (sourceIndexDefinition != null)
_indexManager.RemoveIndexInstance(sourceIndexDefinition.ID, myTransactionToken, mySecurityToken);
}
}
}