Exemplo n.º 1
0
        private static HttpResponseMessage SerialiseDocumentToResonse(AtomDocument document)
        {
            var serialiser = new AtomDocumentSerialiser();
            var content    = new StringContent(serialiser.Serialise(document, "http://localhost:3600/events/atom/document/"),
                                               Encoding.UTF8, "application/atom+xml");
            var response = new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = content
            };

            return(response);
        }
        public async Task <string> GetSerialisedDocument(DocumentId documentId)
        {
            var atomDocument = await shardedAtomDocumentFactory.GetActorRef().Ask <AtomDocument>(new GetAtomDocumentRequest(documentId));

            return(atomDocumentSerialiser.Serialise(atomDocument, "http://matt.com"));
        }
 public async Task <string> GetSerialisedDocument(DocumentId documentId)
 {
     return(atomDocumentSerialiser.Serialise(await GetDocument(documentId), "http://localhost:3600/events/atom/document/"));
 }