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


C# IGraphDB.GetVertices方法代码示例

本文整理汇总了C#中IGraphDB.GetVertices方法的典型用法代码示例。如果您正苦于以下问题:C# IGraphDB.GetVertices方法的具体用法?C# IGraphDB.GetVertices怎么用?C# IGraphDB.GetVertices使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IGraphDB的用法示例。


在下文中一共展示了IGraphDB.GetVertices方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GenerateUpdateRequest

        private RequestUpdate GenerateUpdateRequest(IGraphDB myGraphDB, GQLPluginManager myPluginManager, SecurityToken mySecurityToken, TransactionToken myTransactionToken)
        {
            IEnumerable<IVertex> toBeupdatedVertices = null;
            //prepare
            var vertexType = myGraphDB.GetVertexType<IVertexType>(
                mySecurityToken,
                myTransactionToken,
                new RequestGetVertexType(_TypeName),
                (stats, vtype) => vtype);

            if (_vertexIDs == null)
            {
                if (_WhereExpression != null)
                {
                    //validate
                    _WhereExpression.Validate(myPluginManager, myGraphDB, mySecurityToken, myTransactionToken, vertexType);

                    //calculate
                    var expressionGraph = _WhereExpression.Calculon(myPluginManager, myGraphDB, mySecurityToken, myTransactionToken, new CommonUsageGraph(myGraphDB, mySecurityToken, myTransactionToken), false);

                    //extract

                    toBeupdatedVertices = expressionGraph.Select(new LevelKey(vertexType.ID, myGraphDB, mySecurityToken, myTransactionToken), null, true);
                }
                else
                {
                    toBeupdatedVertices = myGraphDB.GetVertices<IEnumerable<IVertex>>(
                        mySecurityToken,
                        myTransactionToken,
                        new RequestGetVertices(vertexType.ID),
                        (stats, vertices) => vertices);
                }

            }
            else
            {
                toBeupdatedVertices = _vertexIDs;
            }

            var result = new RequestUpdate(new RequestGetVertices(vertexType.ID, toBeupdatedVertices.Select(_ => _.VertexID) , false));

            ProcessListOfUpdates(vertexType, myPluginManager, myGraphDB, mySecurityToken, myTransactionToken, ref result);

            return result;
        }
开发者ID:loubo,项目名称:sones,代码行数:45,代码来源:UpdateNode.cs

示例2: MatchData

        private static void MatchData(DataContainer data, IExpressionGraph resultGraph, IGraphDB myGraphDB, SecurityToken mySecurityToken, Int64 myTransactionToken, TypesOfOperators myTypeOfOperator, BinaryOperator myOperator)
        {
            #region data

            LevelKey myLevelKey = CreateLevelKey(data.IDChainDefinitions.Item1, myGraphDB, mySecurityToken, myTransactionToken);

            #endregion

            var vertices = myGraphDB.GetVertices<List<IVertex>>(
                mySecurityToken,
                myTransactionToken,
                new GraphDB.Request.RequestGetVertices(
                    new BinaryExpression(
                        new PropertyExpression(data.IDChainDefinitions.Item1.LastType.Name, data.IDChainDefinitions.Item1.LastAttribute.Name),
                        myOperator,
                        GenerateLiteral(data.Operands.Item1, ((IPropertyDefinition)data.IDChainDefinitions.Item1.LastAttribute).BaseType))),
                        (stats, vertexEnumerable) => vertexEnumerable.ToList());

            foreach (var aVertex in vertices)
            {
                IntegrateInGraph(aVertex, resultGraph, myLevelKey, myTypeOfOperator);
            }

            if (resultGraph.ContainsLevelKey(myLevelKey))
            {
                #region clean lower levels

                if (myTypeOfOperator == TypesOfOperators.AffectsLowerLevels)
                {
                    CleanLowerLevel(myLevelKey, resultGraph, myGraphDB, mySecurityToken, myTransactionToken);
                }

                #endregion

            }
            else
            {
                resultGraph.AddEmptyLevel(myLevelKey);
            }
        }
开发者ID:ramz,项目名称:sones,代码行数:40,代码来源:ABinaryCompareOperator.cs


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