Example #1
0
 internal static Attachment Create(Model model)
 {
     return(new Attachment(model.Id, model.Filename, model.Url, model.ProxyUrl, model.Size,
                           model.Height.IsSpecified ? model.Height.Value : (int?)null,
                           model.Width.IsSpecified ? model.Width.Value : (int?)null,
                           model.Ephemeral.ToNullable()));
 }
Example #2
0
 internal static Attachment Create(Model model)
 {
     return(new Attachment(model.Id, model.Filename, model.Url, model.ProxyUrl, model.Size,
                           model.Height.IsSpecified ? model.Height.Value : (int?)null,
                           model.Width.IsSpecified ? model.Width.Value : (int?)null,
                           model.Ephemeral.ToNullable(), model.Description.GetValueOrDefault(),
                           model.ContentType.GetValueOrDefault()));
 }
Example #3
0
 public Attachment(Model model)
 {
     Id = model.Id;
     Filename = model.Filename;
     Size = model.Size;
     Url = model.Url;
     ProxyUrl = model.ProxyUrl;
     Height = model.Height.IsSpecified ? model.Height.Value : (int?)null;
     Width = model.Width.IsSpecified ? model.Width.Value : (int?)null;
 }