示例#1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: Object[] getList(org.neo4j.kernel.internal.GraphDatabaseAPI graphDb, ParameterList parameters, String name) throws org.neo4j.server.rest.repr.BadInputException
        internal override object[] GetList(GraphDatabaseAPI graphDb, ParameterList parameters, string name)
        {
            return(parameters.GetBooleanList(name));
        }
示例#2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: Object[] getList(org.neo4j.kernel.internal.GraphDatabaseAPI graphDb, ParameterList parameters, String name) throws org.neo4j.server.rest.repr.BadInputException
        internal override object[] GetList(GraphDatabaseAPI graphDb, ParameterList parameters, string name)
        {
            return(parameters.GetRelationshipList(graphDb, name));
        }
示例#3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: Object get(org.neo4j.kernel.internal.GraphDatabaseAPI graphDb, ParameterList parameters, String name) throws org.neo4j.server.rest.repr.BadInputException
        internal override object Get(GraphDatabaseAPI graphDb, ParameterList parameters, string name)
        {
            return(parameters.GetInteger(name));
        }
示例#4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.server.rest.repr.Representation invoke(org.neo4j.kernel.internal.GraphDatabaseAPI graphDb, Object source, ParameterList params) throws BadPluginInvocationException, PluginInvocationFailureException, org.neo4j.server.rest.repr.BadInputException
        public override Representation Invoke(GraphDatabaseAPI graphDb, object source, ParameterList @params)
        {
            object[] arguments = new object[_extractors.Length];
            using (Transaction tx = graphDb.BeginTx())
            {
                for (int i = 0; i < arguments.Length; i++)
                {
                    arguments[i] = _extractors[i].extract(graphDb, source, @params);
                }
            }
            try
            {
                object returned = _method.invoke(_plugin, arguments);

                if (returned == null)
                {
                    return(Representation.emptyRepresentation());
                }
                return(_result.convert(returned));
            }
            catch (InvocationTargetException exc)
            {
                Exception targetExc = exc.TargetException;
                foreach (Type excType in _method.ExceptionTypes)
                {
                    if (excType.IsInstanceOfType(targetExc))
                    {
                        throw new BadPluginInvocationException(targetExc);
                    }
                }
                throw new PluginInvocationFailureException(targetExc);
            }
            catch (Exception e) when(e is System.ArgumentException || e is IllegalAccessException)
            {
                throw new PluginInvocationFailureException(e);
            }
        }
示例#5
0
 internal override object[] GetList(GraphDatabaseAPI graphDb, ParameterList parameters, string name)
 {
     // TODO Not done yet!
     return(null);
 }