CameraCar.Controllers.PhotoController.GetPhotoPreviewBuff C# (CSharp) Method

GetPhotoPreviewBuff() public static method

public static GetPhotoPreviewBuff ( System.Web.HttpServerUtilityBase server ) : byte[]
server System.Web.HttpServerUtilityBase
return byte[]
        public static byte[] GetPhotoPreviewBuff(HttpServerUtilityBase server)
        {
            _LastAccessUTC = DateTime.UtcNow;
            StartTakingPhotoPreviewWorkerIfNotStarted(server);

            var buff = default(byte[]);
            lock (_syncBuff)
            {
                buff = _AvailableBuffNo == 1 ? _PhotoPreviewBuff1 : _PhotoPreviewBuff2;
            }
            if (buff == null)
            {
                return System.IO.File.ReadAllBytes(server.MapPath("~/App_Data/_blank.png"));
            }
            return buff;
        }