Table of Contents

Class PptxSlide

Namespace
DocToolkit
Assembly
DocToolkit.dll

One slide: a title and zero or more bullet lines. Built by Titled(string, params string[]) and passed to Create(IEnumerable<PptxSlide>).

A single sealed type rather than the closed hierarchy DocxBlock uses. That hierarchy exists because a document has four kinds of block an external assembly must not be able to extend; a deck has one kind of slide in this version, so the same machinery would be cost without benefit. Titled(string, params string[]) leaves room for other factories later without changing what already exists.

public sealed class PptxSlide
Inheritance
PptxSlide
Inherited Members

Properties

Bullets

The bullet lines, in order. Never null; may be empty.

public IReadOnlyList<string> Bullets { get; }

Property Value

IReadOnlyList<string>

Title

The slide's title text. Never null; may be empty.

public string Title { get; }

Property Value

string

Methods

Titled(string, params string[])

A slide with title and one bullet line per entry in bullets. Pass no bullets for a title-only slide.

Arguments are validated immediately, so a bad value throws at the line that produced it rather than later inside a Create(IEnumerable<PptxSlide>) call assembling many slides. Bullets are materialised here; mutating the caller's array afterwards does not change the slide.

public static PptxSlide Titled(string title, params string[] bullets)

Parameters

title string

The title text.

bullets string[]

The bullet lines, in order.

Returns

PptxSlide

Exceptions

ArgumentNullException

title or bullets is null.

ArgumentException

An element of bullets is null.