public GremlinProperty(GremlinKeyword.PropertyCardinality cardinality, string key, object value, Dictionary <string, object> metaProperties) { Cardinality = cardinality; Key = key; Value = value; MetaProperties = metaProperties ?? new Dictionary <string, object>(); }
internal PropertyTuple( GremlinKeyword.PropertyCardinality cardinality, string name, ScalarSubqueryFunction traversalOp, Dictionary <string, Tuple <StringField, ScalarSubqueryFunction> > metaProperties = null) { this.Cardinality = cardinality; this.Name = name; this.TraversalOp = traversalOp; this.MetaProperties = metaProperties ?? new Dictionary <string, Tuple <StringField, ScalarSubqueryFunction> >(); }
public GraphTraversal2 Property(GremlinKeyword.PropertyCardinality cardinality, string key, object value, params object[] keyValues) { if (keyValues.Length % 2 != 0) { throw new Exception("The parameter of property should be even"); } Dictionary <string, object> metaProperties = new Dictionary <string, object>(); for (var i = 0; i < keyValues.Length; i += 2) { metaProperties[keyValues[i] as string] = keyValues[i + 1]; } GremlinProperty property = new GremlinProperty(cardinality, key, value, metaProperties); AddGremlinOperator(new GremlinPropertyOp(property)); return(this); }