/// <summary> /// Creates slides collection. /// </summary> /// <returns></returns> public static SlideCollection Create(PresentationPart sdkPrePart, IPreSettings preSettings) { Check.NotNull(sdkPrePart, nameof(sdkPrePart)); Check.NotNull(preSettings, nameof(preSettings)); var numSlides = sdkPrePart.SlideParts.Count(); var slideCollection = new List <Slide>(numSlides); var sldNumDic = new Dictionary <Slide, SlideNumber>(numSlides); for (var sldIndex = 0; sldIndex < numSlides; sldIndex++) { var sdkSldPart = sdkPrePart.GetSlidePartByIndex(sldIndex); var sldNumEntity = new SlideNumber(sldIndex + 1); var newSlide = new Slide(sdkSldPart, sldNumEntity, preSettings); sldNumDic.Add(newSlide, sldNumEntity); slideCollection.Add(newSlide); } return(new SlideCollection(slideCollection, sdkPrePart, sldNumDic)); }