public void TestSetEntityEventPositionVal() { SetParameterEvent eve = new SetParameterEvent(-1, null); IQuery query = Mock<IQuery>(); using (Mocks.Record()) { Expect.Call(query.SetParameter(-1, null)).Return(query); } using (Mocks.Playback()) { eve.OnEvent(query); } }
public IQuery SetParameter(string name, object val) { IQueryEvent queryEvent = new SetParameterEvent(name, val); foreach (IShard shard in shards) { if (shard.GetQueryById(queryId) != null) { shard.GetQueryById(queryId).SetParameter(name, val); } else { shard.AddQueryEvent(queryId, queryEvent); } } return(this); }
public IQuery SetParameter <T>(int position, T val) { IQueryEvent queryEvent = new SetParameterEvent(position, val); foreach (IShard shard in shards) { if (shard.GetQueryById(queryId) != null) { shard.GetQueryById(queryId).SetParameter(position, val); } else { shard.AddQueryEvent(queryId, queryEvent); } } return(this); }