Example #1
0
 public Attachment(string id, int?width, int?height, string url, string fileName, FileSize fileSize)
 {
     Id       = id;
     Url      = url;
     Width    = width;
     Height   = height;
     FileName = fileName;
     FileSize = fileSize;
 }
Example #2
0
        public Attachment(string id, int?width, int?height, string url, string fileName, FileSize fileSize)
        {
            Id       = id;
            Url      = url;
            Width    = width;
            Height   = height;
            FileName = fileName;
            FileSize = fileSize;

            IsImage = GetIsImage(fileName);

            IsSpoiler = IsImage && FileName.StartsWith("SPOILER_", StringComparison.Ordinal);
        }