예제 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.graphdb.GraphDatabaseService apply(org.neo4j.kernel.api.proc.Context context) throws org.neo4j.internal.kernel.api.exceptions.ProcedureException
        public override GraphDatabaseService Apply(Context context)
        {
            KernelTransaction tx = context.GetOrElse(Org.Neo4j.Kernel.api.proc.Context_Fields.KernelTransaction, null);
            SecurityContext   securityContext;

            if (tx != null)
            {
                securityContext = tx.SecurityContext();
            }
            else
            {
                securityContext = context.Get(Org.Neo4j.Kernel.api.proc.Context_Fields.SecurityContext);
            }
            GraphDatabaseFacade   facade = new GraphDatabaseFacade();
            ProcedureGDBFacadeSPI procedureGDBFacadeSPI = new ProcedureGDBFacadeSPI(_dataSource, _dataSource.neoStoreDataSource.DependencyResolver, _availability, _urlValidator, securityContext, _bridge);

            facade.Init(procedureGDBFacadeSPI, _bridge, _platform.config, _tokenHolders);
            return(facade);
        }