public FileDownloadMessage RetrieveInversion(RetrieveMessage retrieveMessage) { Inversion inversion = null; var inversionQuery = from inv in Inversions where inv.InversionId.Equals(retrieveMessage.InversionId) select inv; foreach (var inv in inversionQuery) { inversion = inv; } if (inversion != null && !inversion.CheckAccessCode(retrieveMessage.AccessCode)) { return null; } // Add user who can access the inversion into user-inversion dictionary UserInversionLookup.Add(retrieveMessage.UserId, inversion); FileDownloadMessage fileDownloadMessage = new FileDownloadMessage(); if (inversion != null) { fileDownloadMessage.FileName = inversion.Name; fileDownloadMessage.FileData = inversion.Retrieve(); } //fileDownloadMessage.FileName = "Filename: aaaa"; //fileDownloadMessage.FileData = new MemoryStream(); return fileDownloadMessage; }
public FileDownloadMessage RetrieveInversion(RetrieveMessage requestrRetrieveMessage) { return _robot.RetrieveInversion(requestrRetrieveMessage); }