public QueryConstraint[] GetConstraints() { System.Diagnostics.Debug.Assert(!this.IsEmpty); var constraints = new QueryConstraint[] { new QueryConstraint(this.FieldName, "like", "%" + this.Text + "%") }; return(constraints); }
public QueryConstraint[] GetConstraints() { System.Diagnostics.Debug.Assert(!this.IsEmpty); var contraints = new QueryConstraint[] { new QueryConstraint(this.FieldName, "=", this.IsChecked.Value) }; return(contraints); }
public static unsafe void Write(global::Improbable.Worker.Internal.GcHandlePool _pool, QueryConstraint _data, global::Improbable.Worker.Internal.Pbio.Object *_obj) { if (_data.sphereConstraint.HasValue) { global::Improbable.ComponentInterest.SphereConstraint_Internal.Write(_pool, _data.sphereConstraint.Value, global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 1)); } if (_data.cylinderConstraint.HasValue) { global::Improbable.ComponentInterest.CylinderConstraint_Internal.Write(_pool, _data.cylinderConstraint.Value, global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 2)); } if (_data.boxConstraint.HasValue) { global::Improbable.ComponentInterest.BoxConstraint_Internal.Write(_pool, _data.boxConstraint.Value, global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 3)); } if (_data.relativeSphereConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeSphereConstraint_Internal.Write(_pool, _data.relativeSphereConstraint.Value, global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 4)); } if (_data.relativeCylinderConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeCylinderConstraint_Internal.Write(_pool, _data.relativeCylinderConstraint.Value, global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 5)); } if (_data.relativeBoxConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeBoxConstraint_Internal.Write(_pool, _data.relativeBoxConstraint.Value, global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 6)); } if (_data.entityIdConstraint.HasValue) { global::Improbable.Worker.Internal.Pbio.AddInt64(_obj, 7, _data.entityIdConstraint.Value); } if (_data.componentConstraint.HasValue) { global::Improbable.Worker.Internal.Pbio.AddUint32(_obj, 8, _data.componentConstraint.Value); } if (_data.andConstraint != null) { for (int _i = 0; _i < _data.andConstraint.Count; ++_i) { global::Improbable.ComponentInterest.QueryConstraint_Internal.Write(_pool, _data.andConstraint[_i], global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 9)); } } if (_data.orConstraint != null) { for (int _i = 0; _i < _data.orConstraint.Count; ++_i) { global::Improbable.ComponentInterest.QueryConstraint_Internal.Write(_pool, _data.orConstraint[_i], global::Improbable.Worker.Internal.Pbio.AddObject(_obj, 10)); } } }
public static unsafe void Write(global::Improbable.Worker.Internal.GcHandlePool _pool, QueryConstraint _data, global::Improbable.Worker.CInterop.SchemaObject _obj) { if (_data.sphereConstraint.HasValue) { global::Improbable.ComponentInterest.SphereConstraint_Internal.Write(_pool, _data.sphereConstraint.Value, _obj.AddObject(1)); } if (_data.cylinderConstraint.HasValue) { global::Improbable.ComponentInterest.CylinderConstraint_Internal.Write(_pool, _data.cylinderConstraint.Value, _obj.AddObject(2)); } if (_data.boxConstraint.HasValue) { global::Improbable.ComponentInterest.BoxConstraint_Internal.Write(_pool, _data.boxConstraint.Value, _obj.AddObject(3)); } if (_data.relativeSphereConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeSphereConstraint_Internal.Write(_pool, _data.relativeSphereConstraint.Value, _obj.AddObject(4)); } if (_data.relativeCylinderConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeCylinderConstraint_Internal.Write(_pool, _data.relativeCylinderConstraint.Value, _obj.AddObject(5)); } if (_data.relativeBoxConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeBoxConstraint_Internal.Write(_pool, _data.relativeBoxConstraint.Value, _obj.AddObject(6)); } if (_data.entityIdConstraint.HasValue) { _obj.AddInt64(7, _data.entityIdConstraint.Value); } if (_data.componentConstraint.HasValue) { _obj.AddUint32(8, _data.componentConstraint.Value); } if (_data.andConstraint != null) { for (int _i = 0; _i < _data.andConstraint.Count; ++_i) { global::Improbable.ComponentInterest.QueryConstraint_Internal.Write(_pool, _data.andConstraint[_i], _obj.AddObject(9)); } } if (_data.orConstraint != null) { for (int _i = 0; _i < _data.orConstraint.Count; ++_i) { global::Improbable.ComponentInterest.QueryConstraint_Internal.Write(_pool, _data.orConstraint[_i], _obj.AddObject(10)); } } }
public static QueryConstraint Deserialize(global::Improbable.Worker.CInterop.SchemaObject obj) { var instance = new QueryConstraint(); { if (obj.GetObjectCount(1) == 1) { instance.SphereConstraint = new global::Improbable.ComponentInterest.SphereConstraint?(global::Improbable.ComponentInterest.SphereConstraint.Serialization.Deserialize(obj.GetObject(1))); } } { if (obj.GetObjectCount(2) == 1) { instance.CylinderConstraint = new global::Improbable.ComponentInterest.CylinderConstraint?(global::Improbable.ComponentInterest.CylinderConstraint.Serialization.Deserialize(obj.GetObject(2))); } } { if (obj.GetObjectCount(3) == 1) { instance.BoxConstraint = new global::Improbable.ComponentInterest.BoxConstraint?(global::Improbable.ComponentInterest.BoxConstraint.Serialization.Deserialize(obj.GetObject(3))); } } { if (obj.GetObjectCount(4) == 1) { instance.RelativeSphereConstraint = new global::Improbable.ComponentInterest.RelativeSphereConstraint?(global::Improbable.ComponentInterest.RelativeSphereConstraint.Serialization.Deserialize(obj.GetObject(4))); } } { if (obj.GetObjectCount(5) == 1) { instance.RelativeCylinderConstraint = new global::Improbable.ComponentInterest.RelativeCylinderConstraint?(global::Improbable.ComponentInterest.RelativeCylinderConstraint.Serialization.Deserialize(obj.GetObject(5))); } } { if (obj.GetObjectCount(6) == 1) { instance.RelativeBoxConstraint = new global::Improbable.ComponentInterest.RelativeBoxConstraint?(global::Improbable.ComponentInterest.RelativeBoxConstraint.Serialization.Deserialize(obj.GetObject(6))); } } { if (obj.GetInt64Count(7) == 1) { instance.EntityIdConstraint = new long?(obj.GetInt64(7)); } } { if (obj.GetUint32Count(8) == 1) { instance.ComponentConstraint = new uint?(obj.GetUint32(8)); } } { instance.AndConstraint = new global::System.Collections.Generic.List <global::Improbable.ComponentInterest.QueryConstraint>(); var list = instance.AndConstraint; var listLength = obj.GetObjectCount(9); for (var i = 0; i < listLength; i++) { list.Add(global::Improbable.ComponentInterest.QueryConstraint.Serialization.Deserialize(obj.IndexObject(9, (uint)i))); } } { instance.OrConstraint = new global::System.Collections.Generic.List <global::Improbable.ComponentInterest.QueryConstraint>(); var list = instance.OrConstraint; var listLength = obj.GetObjectCount(10); for (var i = 0; i < listLength; i++) { list.Add(global::Improbable.ComponentInterest.QueryConstraint.Serialization.Deserialize(obj.IndexObject(10, (uint)i))); } } return(instance); }
public static void Serialize(QueryConstraint instance, global::Improbable.Worker.CInterop.SchemaObject obj) { { if (instance.SphereConstraint.HasValue) { global::Improbable.ComponentInterest.SphereConstraint.Serialization.Serialize(instance.SphereConstraint.Value, obj.AddObject(1)); } } { if (instance.CylinderConstraint.HasValue) { global::Improbable.ComponentInterest.CylinderConstraint.Serialization.Serialize(instance.CylinderConstraint.Value, obj.AddObject(2)); } } { if (instance.BoxConstraint.HasValue) { global::Improbable.ComponentInterest.BoxConstraint.Serialization.Serialize(instance.BoxConstraint.Value, obj.AddObject(3)); } } { if (instance.RelativeSphereConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeSphereConstraint.Serialization.Serialize(instance.RelativeSphereConstraint.Value, obj.AddObject(4)); } } { if (instance.RelativeCylinderConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeCylinderConstraint.Serialization.Serialize(instance.RelativeCylinderConstraint.Value, obj.AddObject(5)); } } { if (instance.RelativeBoxConstraint.HasValue) { global::Improbable.ComponentInterest.RelativeBoxConstraint.Serialization.Serialize(instance.RelativeBoxConstraint.Value, obj.AddObject(6)); } } { if (instance.EntityIdConstraint.HasValue) { obj.AddInt64(7, instance.EntityIdConstraint.Value); } } { if (instance.ComponentConstraint.HasValue) { obj.AddUint32(8, instance.ComponentConstraint.Value); } } { foreach (var value in instance.AndConstraint) { global::Improbable.ComponentInterest.QueryConstraint.Serialization.Serialize(value, obj.AddObject(9)); } } { foreach (var value in instance.OrConstraint) { global::Improbable.ComponentInterest.QueryConstraint.Serialization.Serialize(value, obj.AddObject(10)); } } }
public DataFluentHelper <SourceT> On(Expression <Func <SourceT, object> > SourceProperty, EqualityTypes Equality, Expression <Func <DestT, object> > DestinationProperty) { _joinConstraint = new QueryConstraint <SourceT, DestT>(SourceProperty, Equality, DestinationProperty); return(_mainQuery); }