Пример #1
0
 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);
 }
Пример #2
0
 internal EmbedImage(Model model)
     : this(model.Url, model.ProxyUrl, (int?)model.Height, (int?)model.Width)
 {
 }
Пример #3
0
 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));
 }
Пример #4
0
 public EmbedImageBuilder()
 {
     _model = new Image();
 }