Source

main-vinayFork / Source / WebClient / Web.BizLogic / Services / Interfaces / IBlobService.cs

Full commit

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataUp.Web.DataLayer;

namespace DataUp.Web.BizLogic
{
    /// <summary>
    /// Interface representing the blob service methods. Also, needed for adding unit test cases.
    /// </summary>
    public interface IBlobService
    {
        /// <summary>
        /// Gets the files from azure which is identified by file id.
        /// </summary>
        /// <param name="fileID">
        /// ID of the file.
        /// </param>
        /// <returns>
        /// Blob Details.
        /// </returns>
        BlobDetails GetFile(Guid fileId);

        /// <summary>
        /// Checks a file in azure.
        /// </summary>
        /// <param name="fileName">
        /// Name of the file which has to be checked.
        /// </param>
        /// <returns>
        /// True if the file is found successfully; otherwise false.
        /// </returns>
        OperationStatus CheckIfExists(string fileName);

        /// <summary>
        /// Uploads the file to db/azure.
        /// </summary>
        /// <param name="fileDetail">
        /// Details of the file.
        /// </param>
        /// <returns>
        /// True if content is uploaded; otherwise false.
        /// </returns>
        OperationStatus UploadFile(DataDetail fileDetail);
    }
}