コード例 #1
0
        public void SimpleImplicitStringConversion()
        {
            var t = new NTString("hi");
            var o = new ImplicitTestConvertToString(t);
            Assert.AreEqual("hi", o._s);

        }
コード例 #2
0
 static CypherCoercions()
 {
     _converters[NTAny.GetType()]             = (a, ignore1, ignore2) => a;
     _converters[NTString.GetType()]          = (a, ignore1, ignore2) => AsTextValue(a);
     _converters[NTNumber.GetType()]          = (a, ignore1, ignore2) => AsNumberValue(a);
     _converters[NTInteger.GetType()]         = (a, ignore1, ignore2) => AsIntegralValue(a);
     _converters[NTFloat.GetType()]           = (a, ignore1, ignore2) => AsFloatingPointValue(a);
     _converters[NTBoolean.GetType()]         = (a, ignore1, ignore2) => AsBooleanValue(a);
     _converters[NTMap.GetType()]             = (a, ignore, c) => AsMapValue(a, c);
     _converters[NTNode.GetType()]            = (a, ignore1, ignore2) => AsNodeValue(a);
     _converters[NTRelationship.GetType()]    = (a, ignore1, ignore2) => AsRelationshipValue(a);
     _converters[NTPath.GetType()]            = (a, ignore1, ignore2) => AsPathValue(a);
     _converters[NTGeometry.GetType()]        = (a, ignore1, ignore2) => AsPointValue(a);
     _converters[NTPoint.GetType()]           = (a, ignore1, ignore2) => AsPointValue(a);
     _converters[NTDateTime.GetType()]        = (a, ignore1, ignore2) => AsDateTimeValue(a);
     _converters[NTLocalDateTime.GetType()]   = (a, ignore1, ignore2) => AsLocalDateTimeValue(a);
     _converters[NTDate.GetType()]            = (a, ignore1, ignore2) => AsDateValue(a);
     _converters[NTTime.GetType()]            = (a, ignore1, ignore2) => AsTimeValue(a);
     _converters[NTLocalTime.GetType()]       = (a, ignore1, ignore2) => AsLocalTimeValue(a);
     _converters[NTDuration.GetType()]        = (a, ignore1, ignore2) => AsDurationValue(a);
     _converters[typeof(Neo4jTypes.ListType)] = new ListCoercer();
 }
コード例 #3
0
 public ImplicitTestForTheObject(NTString obj)
 {
     _s = obj;
 }
コード例 #4
0
 public void SimpleTStringCTor()
 {
     var t = new NTString("hi");
     Assert.AreEqual("hi", t.Data());
 }