예제 #1
0
 internal StreamingMappingWriter(JsonGenerator g, string key)
 {
     this.G = g;
     try
     {
         g.writeObjectFieldStart(key);
     }
     catch (IOException e)
     {
         throw new WebApplicationException(e);
     }
 }
예제 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void writeProperties(org.codehaus.jackson.JsonGenerator out, org.neo4j.graphdb.PropertyContainer container) throws java.io.IOException
        private void WriteProperties(JsonGenerator @out, PropertyContainer container)
        {
            @out.writeObjectFieldStart("properties");
            try
            {
                foreach (KeyValuePair <string, object> property in container.AllProperties.SetOfKeyValuePairs())
                {
                    @out.writeObjectField(property.Key, property.Value);
                }
            }
            finally
            {
                @out.writeEndObject();
            }
        }
예제 #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void write(org.codehaus.jackson.JsonGenerator out, Iterable<String> columns, org.neo4j.graphdb.Result_ResultRow row, TransactionStateChecker txStateChecker) throws java.io.IOException
        public override void Write(JsonGenerator @out, IEnumerable <string> columns, Org.Neo4j.Graphdb.Result_ResultRow row, TransactionStateChecker txStateChecker)
        {
            ISet <Node>         nodes         = new HashSet <Node>();
            ISet <Relationship> relationships = new HashSet <Relationship>();

            Extract(nodes, relationships, Map(columns, row));

            @out.writeObjectFieldStart("graph");
            try
            {
                WriteNodes(@out, nodes, txStateChecker);
                WriteRelationships(@out, relationships, txStateChecker);
            }
            finally
            {
                @out.writeEndObject();
            }
        }