public byte[] GetUserImage(int userID, S2CImagesSize size) { if (userID <= 0) { SetLastError(log, ErrorCodes.WRONG_INPUT, string.Format("Input error: userID={0}", userID)); return(new byte[0]); } return(WebConnector.Current.SendByteRequest(GET_IMAGE_URL, userID + "&size=" + (int)size, false, false)); }
///////////////////////////////////////////////////////////////////////////////////////////////// #region Navigation Properties ///////////////////////////////////////////////////////////////////////////////////////////////////// //[XmlIgnore] //public string PictureRelativePath { get { return System.IO.Path.Combine("Content", "Images", "Users", ID + ".png"); } } /// <summary> /// Retrieves the name of the picture for this user, related to the given size /// </summary> /// <param name="size"></param> /// <returns></returns> public string PictureRelativePath(S2CImagesSize size) { return(string.Format("{0}_{1}.png", ID, size)); }
///////////////////////////////////////////////////////////////////////////////////////////////// #region Navigation Properties ///////////////////////////////////////////////////////////////////////////////////////////////////// //[XmlIgnore] //public string PictureRelativePath { get { return System.IO.Path.Combine("Content", "Images", "Users", ID + ".png"); } } /// <summary> /// Retrieves the name of the picture for this user, related to the given size /// </summary> /// <param name="size"></param> /// <returns></returns> public string PictureRelativePath(S2CImagesSize size) { return string.Format("{0}_{1}.png", ID, size); }
public byte[] GetUserImage(int userID, S2CImagesSize size) { if (userID <= 0) { SetLastError(log, ErrorCodes.WRONG_INPUT, string.Format("Input error: userID={0}", userID)); return new byte[0]; } return WebConnector.Current.SendByteRequest(GET_IMAGE_URL, userID + "&size=" + (int)size, false, false); }