public static ListRepresentation GetListRepresentation(System.Collections.IEnumerable data) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.helpers.collection.FirstItemIterable<Representation> results = convertValuesToRepresentations(data); FirstItemIterable <Representation> results = ConvertValuesToRepresentations(data); return(new ServerListRepresentation(GetType(results), results)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @SuppressWarnings("unchecked") static Representation getIteratorRepresentation(java.util.Iterator data) internal static Representation GetIteratorRepresentation(System.Collections.IEnumerator data) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.helpers.collection.FirstItemIterable<Representation> results = new org.neo4j.helpers.collection.FirstItemIterable<>(new org.neo4j.helpers.collection.IteratorWrapper<Representation,Object>(data) FirstItemIterable <Representation> results = new FirstItemIterable <Representation>(new IteratorWrapperAnonymousInnerClass(data)); return(new ListRepresentation(GetType(results), results)); }
internal static RepresentationType GetType(FirstItemIterable <Representation> representations) { Representation representation = representations.First; if (representation == null) { return(RepresentationType.String); } return(representation.RepresentationType); }
protected internal override Representation underlyingObjectToObject(object value) { if (value is System.Collections.IEnumerable) { FirstItemIterable <Representation> nested = ConvertValuesToRepresentations((System.Collections.IEnumerable)value); return(new ListRepresentation(GetType(nested), nested)); } else { return(GetSingleRepresentation(value)); } }