Esempio n. 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;
 }
Esempio n. 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);
        }