ServiceStack.WebHost.Endpoints.Tests.PartialContentService.Get C# (CSharp) Method

Get() public method

public Get ( PartialFile request ) : object
request PartialFile
return object
        public object Get(PartialFile request)
        {
            if (request.RelativePath.IsNullOrEmpty())
                throw new ArgumentNullException("RelativePath");

            string filePath = "~/{0}".Fmt(request.RelativePath).MapProjectPath();
            if (!File.Exists(filePath))
                throw new FileNotFoundException(request.RelativePath);

            return new HttpResult(new FileInfo(filePath), request.MimeType);
        }

Same methods

PartialContentService::Get ( PartialFromMemory request ) : object
PartialContentService::Get ( PartialFromText request ) : object
PartialContentService