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


C# IVertexType.GetDescendantVertexTypes方法代码示例

本文整理汇总了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;
        }
开发者ID:anukat2015,项目名称:sones,代码行数:44,代码来源:QueryPlanInRangeWithIndex.cs

示例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);
                }
            }
        }
开发者ID:loubo,项目名称:sones,代码行数:29,代码来源:ExecuteVertexTypeManager.cs


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