/// <summary> /// Initializes a new instance of the <see cref="ArticleInfoResponse"/> class. /// </summary> public ArticlePriceResponse(MosaicMessage message) { Interfaces.Messages.ArticleInformation.ArticlePriceResponse response = (Interfaces.Messages.ArticleInformation.ArticlePriceResponse)message; this.Id = response.ID; this.Source = response.Source; this.Destination = response.Destination; this.Currency = response.Currency; this.Article = new Article[response.Articles.Length]; for (int i = 0; i < response.Articles.Length; i++) { this.Article[i] = response.Articles[i]; } }
/// <summary> /// Translates this object instance into a Mosaic message. /// </summary> /// <param name="converterStream">The converter stream instance which request the message conversion.</param> /// <returns> /// The Mosaic message representation of this object. /// </returns> public MosaicMessage ToMosaicMessage(IConverterStream converterStream) { var response = new Interfaces.Messages.ArticleInformation.ArticlePriceResponse(converterStream); response.ID = this.Id; response.Source = this.Source; response.Destination = this.Destination; response.Currency = this.Currency; response.Articles = new Article[this.Article.Length]; for (int i = 0; i < this.Article.Length; i++) { response.Articles[i] = this.Article[i]; } return(response); }