public async Task Write <K, E>(string originatorId, EventSourceEntry <K, E> entry, DateTime?utcTimeStamp = default(DateTime?), bool sync = false) { var esw = new EventSourceWrapper <K, E>() { OriginatorId = originatorId, Entry = entry, Timestamp = utcTimeStamp ?? DateTime.UtcNow }; JObject jObj = JObject.FromObject(esw); jObj["id"] = mInstance + Guid.NewGuid().ToString("N"); await mDocDb.Collection.Create(jObj.ToString()); }
/// <summary> /// Create listener /// </summary> /// <param name="subscriber"></param> /// <param name="outer"></param> internal EventSourceSubscriber( IEventSourceSubscriber subscriber, EventSourceWrapper outer) { _subscriber = subscriber; _outer = outer; }