Ejemplo n.º 1
0
        public static void UploadDocument([QueueTrigger("uploadqueue")] string blobName, [Blob("uploadbatch/{queueTrigger}", FileAccess.Read)] Stream blobStream, TextWriter log)
        {
            try
            {
                var binaryFormatter = new BinaryFormatter();

                var uploadDocs = binaryFormatter.Deserialize(blobStream) as UploadDocumentParameter[];

                uploadDocs.AsParallel().ForAll(doc => LSA.CreateDocument(doc.StreamData, doc.FileName));
            }
            catch (Exception)
            {
                throw;
            }
        }