Source

main / Source / WebClient / Web.BizLogic / Model / DataDetail.cs

Full commit
Naethra D 3ee1b94 































































using System;
using System.IO;
namespace DataUp.Web.BizLogic
{
    /// <summary>
    /// Class representing the model for files which are uploaded
    /// </summary>
    public class DataDetail
    {
        /// <summary>
        /// Gets or sets Content ID of the Data
        /// </summary>
        public long? ContentId { get; set; }

        /// <summary>
        /// Gets or sets the name of the file
        /// </summary>
        public string FileName { get; set; }

        /// <summary>
        /// Gets or sets the Content MIME Type of the file.
        /// </summary>
        public string MimeType { get; set; }

        /// <summary>
        /// Gets or sets file data stream.
        /// </summary>
        public Stream DataStream { get; set; }

        /// <summary>
        /// Gets or sets file size
        /// </summary>
        public double Size { get; set; }

        /// <summary>
        /// Gets or sets File Azure Id
        /// </summary>
        public Guid AzureId { get; set; }

        /// <summary>
        /// Gets the extension of the file.
        /// </summary>
        public string Extension
        {
            get
            {
                return Path.GetExtension(this.FileName);
            }
        }

        /// <summary>
        /// Gets the filename without extension.
        /// </summary>
        public string Title
        {
            get
            {
                return Path.GetFileNameWithoutExtension(this.FileName);
            }
        }

    }
}