コード例 #1
0
 public Attachment(AttachmentJsonModel model)
 {
     Id       = model.Id;
     Filename = model.Filename;
     Filesize = model.Size;
     Url      = model.Url;
     ProxyUrl = model.ProxyUrl;
     Size     = model.Width.HasValue && model.Height.HasValue
         ? new Size(model.Width.Value.GetValueOrDefault(), model.Height.Value.GetValueOrDefault())
         : null;
 }
コード例 #2
0
 public Attachment(AttachmentJsonModel model)
 {
     Id          = model.Id;
     FileName    = model.FileName;
     ContentType = model.ContentType.GetValueOrDefault();
     FileSize    = model.Size;
     Url         = model.Url;
     ProxyUrl    = model.ProxyUrl;
     Width       = model.Width.GetValueOrNullable();
     Height      = model.Height.GetValueOrNullable();
 }