public Embed Build() { _model.Author = Author?.ToModel(); _model.Footer = Footer?.ToModel(); _model.Timestamp = Timestamp?.ToUniversalTime(); _model.Thumbnail = Thumbnail?.ToModel(); _model.Image = Image?.ToModel(); _model.Fields = _fields.ToArray(); return(_model); }
internal EmbedImage(Model model) : this(model.Url, model.ProxyUrl, (int?)model.Height, (int?)model.Width) { }
internal static EmbedImage Create(Model model) { return(new EmbedImage(model.Url, model.ProxyUrl, model.Height.IsSpecified ? model.Height.Value : (int?)null, model.Width.IsSpecified ? model.Width.Value : (int?)null)); }
public EmbedImageBuilder() { _model = new Image(); }