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())); }
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())); }
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; }