Esempio n. 1
0
        public static IList <object> Serialize(URI baseUri, ListRepresentation repr)
        {
            IList <object> result = new List <object>();

            repr.Serialize(new ListSerializer(new ListWrappingWriter(result), baseUri, null));
            return(result);
        }
Esempio n. 2
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected:
//ORIGINAL LINE: public CypherResultRepresentation(final org.neo4j.graphdb.Result result, boolean includeStats, boolean includePlan)
        public CypherResultRepresentation(Result result, bool includeStats, bool includePlan) : base(RepresentationType.String)
        {
            _resultRepresentation = CreateResultRepresentation(result);
            _columns             = ListRepresentation.String(result.Columns());
            _statsRepresentation = includeStats ? new CypherStatisticsRepresentation(result.QueryStatistics) : null;
            _plan = includePlan ? CypherPlanRepresentation.NewFromProvider(PlanProvider(result)) : null;
        }
Esempio n. 3
0
 internal override void ExtraData(MappingSerializer serializer)
 {
     if (!Deleted)
     {
         MappingWriter writer     = serializer.Writer;
         MappingWriter properties = writer.NewMapping(RepresentationType.Properties, "data");
         (new PropertiesRepresentation(_node)).serialize(properties);
         if (writer.Interactive)
         {
             serializer.PutList("relationship_types", ListRepresentation.RelationshipTypes(_node.GraphDatabase.AllRelationshipTypes));
         }
         properties.Done();
     }
 }
Esempio n. 4
0
 protected internal override Representation dispatchTemporalAmountArrayProperty(TemporalAmount[] property, Void param)
 {
     return(ListRepresentation.TemporalAmounts(property));
 }
Esempio n. 5
0
 protected internal override Representation dispatchPointArrayProperty(Point[] property, Void param)
 {
     return(ListRepresentation.Points(property));
 }
Esempio n. 6
0
 protected internal override Representation dispatchStringArrayProperty(string[] property, Void param)
 {
     return(ListRepresentation.Strings(property));
 }
Esempio n. 7
0
 public virtual void PutList(string key, ListRepresentation value)
 {
     Serialize(Writer.newList(value.Type, key), value);
 }
Esempio n. 8
0
 internal void Serialize(ListWriter list, ListRepresentation value)
 {
     value.Serialize(new ListSerializer(list, _baseUri, _extensions));
     list.Done();
 }
Esempio n. 9
0
 public static IList <object> Serialize(ListRepresentation repr)
 {
     return(Serialize(_baseUri, repr));
 }