コード例 #1
0
        public void SupportingGremlinNetIOTests()
        {
// tag::supportingGremlinNetIO[]
            var graphsonReader = new GraphSON3Reader(
                new Dictionary <string, IGraphSONDeserializer> {
                { MyType.GraphsonType, new MyTypeReader() }
            });
            var graphsonWriter = new GraphSON3Writer(
                new Dictionary <Type, IGraphSONSerializer> {
                { typeof(MyType), new MyClassWriter() }
            });

            var gremlinClient = new GremlinClient(new GremlinServer("localhost", 8182), graphsonReader, graphsonWriter);
// end::supportingGremlinNetIO[]
        }
コード例 #2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="JanusGraphGraphSONMessageSerializer" /> class.
 /// </summary>
 /// <param name="graphSONReader">The <see cref="GraphSON3Reader"/> used to deserialize from GraphSON.</param>
 /// <param name="graphSONWriter">The <see cref="GraphSON3Writer"/> used to serialize to GraphSON.</param>
 public JanusGraphGraphSONMessageSerializer(GraphSON3Reader graphSONReader, GraphSON3Writer graphSONWriter)
 {
     _serializer = new GraphSON3MessageSerializer(graphSONReader, graphSONWriter);
 }
コード例 #3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="GraphSON3MessageSerializer" /> class with custom serializers.
 /// </summary>
 /// <param name="graphSONReader">The <see cref="GraphSON3Reader"/> used to deserialize from GraphSON.</param>
 /// <param name="graphSONWriter">The <see cref="GraphSON3Writer"/> used to serialize to GraphSON.</param>
 public GraphSON3MessageSerializer(GraphSON3Reader graphSONReader = null, GraphSON3Writer graphSONWriter = null)
     : base(MimeType, graphSONReader ?? new GraphSON3Reader(), graphSONWriter ?? new GraphSON3Writer())
 {
 }