コード例 #1
0
        public TransferOptions Map(Options options)
        {
            if (options == null)
            {
                return null;
            }

            return new TransferOptions
            {
                OptionsId = options.OptionsId,
                AnnouncerName = options.AnnouncerName,
                Description = options.Description,
                FontSize = options.FontSize,
                ReadingSpeed = options.ReadingSpeed,

				EntityState = EntityState.Unchanged
            };
        }
コード例 #2
0
	    public Script Parse(Stream stream)
		{
            stream.CheckForNull("stream");

	        Options options = new Options();

			Script script = new Script
			{
                Sections = new List<Section>(),
                Options = options,
				EntityState = EntityState.Added
			};

			using (PresentationDocument document
				= PresentationDocument.Open(stream, false))
			{
			    int order = 0;
				for (int i = 0; i < SlidesCount(document); i++)
				{
					string notes = GetSlideNotes(document, i);

				    if (!string.IsNullOrWhiteSpace(notes))
                    {
                        script.Sections.Add(
                            new Section
                            {
                                Text = notes,
                                Order = order,
                                SectionId = order,
                                EntityState = EntityState.Added
                            });

                        ++order;
                    }
				}
			}
			return script;
		}