public async Task AddAsync(FakeQueueData item, CancellationToken cancellationToken = default(CancellationToken)) { if (_prefix != null) { // Add these to a look-aside buffer. Won't trigger further item.ExtraPropertery = _prefix; List <FakeQueueData> l; if (!_parent._prefixedItems.TryGetValue(_prefix, out l)) { l = new List <FakeQueueData>(); _parent._prefixedItems[_prefix] = l; } l.Add(item); } else { await _parent.AddAsync(item); } }
public static async Task SendDirectClient( [FakeQueue("CustomConstructor", CustomPolicy = "Custom")] FakeQueueClient client) { await client.AddAsync(new FakeQueueData { Message = "abc", ExtraPropertery = "def" }); }
public static async Task SendDirectClient( [FakeQueue] FakeQueueClient client) { await client.AddAsync(new FakeQueueData { Message = "abc", ExtraPropertery = "def" }); }