private Models.Publication BuildPublicationFrom(Publication publication) { Models.Publication result = new Models.Publication { Id = publication.ItemId.ToString(), Title = publication.Title }; var customMeta = publication.CustomMetas; if (customMeta == null) { return(result); } result.ProductFamily = null; result.ProductReleaseVersion = null; foreach (var x in customMeta.Edges) { if (x.Node.Key == PublicationTitleMeta) { result.Title = x.Node.Value; } if (x.Node.Key == PublicationLangMeta) { result.Language = x.Node.Value; } if (x.Node.Key == PublicationProductfamilynameMeta) { if (result.ProductFamily == null) { result.ProductFamily = new List <string>(); } result.ProductFamily.Add(x.Node.Value); } if (x.Node.Key == PublicationProductreleasenameMeta) { if (result.ProductReleaseVersion == null) { result.ProductReleaseVersion = new List <string>(); } result.ProductReleaseVersion.Add(x.Node.Value); } if (x.Node.Key == PublicationCratedonMeta) { result.CreatedOn = DateTime.ParseExact(x.Node.Value, DateTimeFormat, null); } if (x.Node.Key == PublicationVersionMeta) { result.Version = x.Node.Value; } if (x.Node.Key == PublicationVersionrefMeta) { result.VersionRef = x.Node.Value; } if (x.Node.Key == PublicationLogicalId) { result.LogicalId = x.Node.Value; } } return(result); }
/// <summary> /// Initializes a new instance of the <see cref="NewsSummaryEventArgs" /> class. /// </summary> /// <param name="story">The story.</param> public NewsSummaryEventArgs(Models.Publication story) { this.Story = story; }
public PublicationViewDetailTexte(Models.Publication publication) { InitializeComponent(); BindingContext = new ViewModels.PublicationDetailViewPageViewModel(publication); }
/// <summary> /// Initializes a new instance of the <see cref="NewsSummaryEventArgs" /> class. /// </summary> /// <param name="story">The story.</param> /// <param name="watch">The watch.</param> public NewsSummaryEventArgs(Models.Publication story, Stopwatch watch) { this.Story = story; this.Watch = watch; }
public PublicationDetailPage(Models.Publication data) { InitializeComponent(); //BindingContext = new ViewModels.PublicationDetailPageViewModel(data); }