Source

main-vinayFork / Source / WebService / Web.Admin / Exceptions / DocumentLengthFault.cs

Full commit
using System.Runtime.Serialization;
using DataUp.Web.Service.Model;

namespace DataUp.Web.Admin
{
    [DataContract(Namespace = WebServiceNamespaces.DataContractNamespace)]
    public class DocumentLengthFault : WebServiceFault
    {
        [DataMember]
        public string FileName { get; set; }

        [DataMember]
        public long FileLength { get; set; }

        public static DocumentLengthFault FileEmpty(string fileName)
        {
            return new DocumentLengthFault
            {
                Message = string.Format("File is empty."),
                FileName = fileName,
                FileLength = 0
            };
        }
    }
}