Ejemplo n.º 1
0
        public List <ServiceIndexDefinition> DescribeIndices(SecurityToken mySecurityToken, Int64 myTransactionToken,
                                                             String myVertexTypeName)
        {
            var Request  = ServiceRequestFactory.MakeRequestDescribeIndex(myVertexTypeName, ""); // todo prove the capability of this method call
            var Response = this.GraphDS.DescribeIndices <IEnumerable <IIndexDefinition> >(mySecurityToken, myTransactionToken, Request,
                                                                                          ServiceReturnConverter.ConverteOnlyIndexDefinitions);

            return(Response.Select(x => new ServiceIndexDefinition(x)).ToList());
        }
Ejemplo n.º 2
0
        public ServiceIndexDefinition DescribeIndex(SecurityToken mySecurityToken, Int64 myTransactionToken,
                                                    String myVertexTypeName, String myIndexName)
        {
            var Request  = ServiceRequestFactory.MakeRequestDescribeIndex(myVertexTypeName, myIndexName);
            var Response = this.GraphDS.DescribeIndex <IEnumerable <IIndexDefinition> >(mySecurityToken, myTransactionToken, Request,
                                                                                        ServiceReturnConverter.ConverteOnlyIndexDefinitions);

            return(new ServiceIndexDefinition(Response.FirstOrDefault())); //should only returns one index definition
        }
Ejemplo n.º 3
0
        public List <ServiceIndexDefinition> DescribeIndicesByNames(SecurityToken mySecurityToken, Int64 myTransactionToken,
                                                                    String myVertexTypeName, List <String> myIndexNames)
        {
            var ResponseList = new List <ServiceIndexDefinition>();

            foreach (var item in myIndexNames)
            {
                var Request  = ServiceRequestFactory.MakeRequestDescribeIndex(myVertexTypeName, item);
                var Response = this.GraphDS.DescribeIndex <IEnumerable <IIndexDefinition> >(mySecurityToken, myTransactionToken, Request, ServiceReturnConverter.ConverteOnlyIndexDefinitions);
                foreach (var index in Response)
                {
                    ResponseList.Add(new ServiceIndexDefinition(index));
                }
            }
            return(ResponseList);
        }