Table of Contents

Class ChartFile

Namespace
ChartTools.IO.Chart
Assembly
ChartTools.dll

Provides methods for reading and writing chart files

public static class ChartFile
Inheritance
ChartFile
Inherited Members

Properties

DefaultReadConfig

Default configuration to use for reading when the provided configuration is default

public static ChartReadingConfiguration DefaultReadConfig { get; set; }

Property Value

ChartReadingConfiguration

DefaultWriteConfig

Default configuration to use for writing when the provided configuration is default

public static ChartWritingConfiguration DefaultWriteConfig { get; set; }

Property Value

ChartWritingConfiguration

Methods

ReadComponents(ReadingDataSource, ComponentList, ChartReadingConfiguration?, FormattingRules?)

public static Song ReadComponents(ReadingDataSource source, ComponentList components, ChartReadingConfiguration? config = null, FormattingRules? formatting = null)

Parameters

source ReadingDataSource
components ComponentList
config ChartReadingConfiguration
formatting FormattingRules

Returns

Song

ReadComponentsAsync(ReadingDataSource, ComponentList, ChartReadingConfiguration?, FormattingRules?, CancellationToken)

public static Task<Song> ReadComponentsAsync(ReadingDataSource source, ComponentList components, ChartReadingConfiguration? config = null, FormattingRules? formatting = null, CancellationToken cancellationToken = default)

Parameters

source ReadingDataSource
components ComponentList
config ChartReadingConfiguration
formatting FormattingRules
cancellationToken CancellationToken

Returns

Task<Song>

ReadGlobalEvents(ReadingDataSource)

public static List<GlobalEvent> ReadGlobalEvents(ReadingDataSource source)

Parameters

source ReadingDataSource

Returns

List<GlobalEvent>

ReadGlobalEventsAsync(ReadingDataSource, CancellationToken)

public static Task<List<GlobalEvent>> ReadGlobalEventsAsync(ReadingDataSource source, CancellationToken cancellationToken = default)

Parameters

source ReadingDataSource
cancellationToken CancellationToken

Returns

Task<List<GlobalEvent>>

ReadInstruments(ReadingDataSource, InstrumentComponentList, ChartReadingConfiguration?, FormattingRules?)

public static InstrumentSet ReadInstruments(ReadingDataSource source, InstrumentComponentList components, ChartReadingConfiguration? config = null, FormattingRules? formatting = null)

Parameters

source ReadingDataSource
components InstrumentComponentList
config ChartReadingConfiguration
formatting FormattingRules

Returns

InstrumentSet

ReadInstrumentsAsync(ReadingDataSource, InstrumentComponentList, ChartReadingConfiguration?, FormattingRules?, CancellationToken)

public static Task<InstrumentSet> ReadInstrumentsAsync(ReadingDataSource source, InstrumentComponentList components, ChartReadingConfiguration? config = null, FormattingRules? formatting = null, CancellationToken cancellationToken = default)

Parameters

source ReadingDataSource
components InstrumentComponentList
config ChartReadingConfiguration
formatting FormattingRules
cancellationToken CancellationToken

Returns

Task<InstrumentSet>

ReadMetadata(ReadingDataSource, Metadata?)

Reads metadata from a chart file.

public static Metadata ReadMetadata(ReadingDataSource source, Metadata? existing = null)

Parameters

source ReadingDataSource
existing Metadata

Returns

Metadata

ReadMetadataAsync(ReadingDataSource, Metadata?, CancellationToken)

public static Task<Metadata> ReadMetadataAsync(ReadingDataSource source, Metadata? existing = null, CancellationToken cancellationToken = default)

Parameters

source ReadingDataSource
existing Metadata
cancellationToken CancellationToken

Returns

Task<Metadata>

ReadSong(ReadingDataSource, ChartReadingConfiguration?, FormattingRules?)

public static Song ReadSong(ReadingDataSource source, ChartReadingConfiguration? config = null, FormattingRules? formatting = null)

Parameters

source ReadingDataSource
config ChartReadingConfiguration
formatting FormattingRules

Returns

Song

ReadSongAsync(ReadingDataSource, ChartReadingConfiguration?, FormattingRules?, CancellationToken)

public static Task<Song> ReadSongAsync(ReadingDataSource source, ChartReadingConfiguration? config = null, FormattingRules? formatting = null, CancellationToken cancellationToken = default)

Parameters

source ReadingDataSource
config ChartReadingConfiguration
formatting FormattingRules
cancellationToken CancellationToken

Returns

Task<Song>

ReadSyncTrack(ReadingDataSource, ChartReadingConfiguration?)

public static SyncTrack ReadSyncTrack(ReadingDataSource source, ChartReadingConfiguration? config = null)

Parameters

source ReadingDataSource
config ChartReadingConfiguration

Returns

SyncTrack

ReadSyncTrackAsync(ReadingDataSource, ChartReadingConfiguration?, CancellationToken)

public static Task<SyncTrack> ReadSyncTrackAsync(ReadingDataSource source, ChartReadingConfiguration? config = null, CancellationToken cancellationToken = default)

Parameters

source ReadingDataSource
config ChartReadingConfiguration
cancellationToken CancellationToken

Returns

Task<SyncTrack>

ReadVocals(ReadingDataSource)

public static StandardVocalsTrack ReadVocals(ReadingDataSource source)

Parameters

source ReadingDataSource

Returns

StandardVocalsTrack

ReadVocalsAsync(ReadingDataSource, CancellationToken)

public static Task<StandardVocalsTrack> ReadVocalsAsync(ReadingDataSource source, CancellationToken cancellationToken = default)

Parameters

source ReadingDataSource
cancellationToken CancellationToken

Returns

Task<StandardVocalsTrack>

ReplaceComponents(WritingDataSource, Song, ComponentList, ChartWritingConfiguration?)

public static void ReplaceComponents(WritingDataSource source, Song song, ComponentList components, ChartWritingConfiguration? config = null)

Parameters

source WritingDataSource
song Song
components ComponentList
config ChartWritingConfiguration

ReplaceComponentsAsync(WritingDataSource, Song, ComponentList, ChartWritingConfiguration?, CancellationToken)

public static Task ReplaceComponentsAsync(WritingDataSource source, Song song, ComponentList components, ChartWritingConfiguration? config = null, CancellationToken cancellationToken = default)

Parameters

source WritingDataSource
song Song
components ComponentList
config ChartWritingConfiguration
cancellationToken CancellationToken

Returns

Task

ReplaceGlobalEvents(WritingDataSource, IEnumerable<GlobalEvent>)

Replaces the global events in a file.

public static void ReplaceGlobalEvents(WritingDataSource source, IEnumerable<GlobalEvent> events)

Parameters

source WritingDataSource
events IEnumerable<GlobalEvent>

Events to use as a replacement

ReplaceGlobalEventsAsync(WritingDataSource, IEnumerable<GlobalEvent>, CancellationToken)

public static Task ReplaceGlobalEventsAsync(WritingDataSource source, IEnumerable<GlobalEvent> events, CancellationToken cancellationToken = default)

Parameters

source WritingDataSource
events IEnumerable<GlobalEvent>
cancellationToken CancellationToken

Returns

Task

ReplaceInstruments(WritingDataSource, InstrumentSet, InstrumentComponentList, ChartWritingConfiguration?, FormattingRules?)

public static void ReplaceInstruments(WritingDataSource source, InstrumentSet set, InstrumentComponentList components, ChartWritingConfiguration? config = null, FormattingRules? formatting = null)

Parameters

source WritingDataSource
set InstrumentSet
components InstrumentComponentList
config ChartWritingConfiguration
formatting FormattingRules

ReplaceInstrumentsAsync(WritingDataSource, InstrumentSet, InstrumentComponentList, ChartWritingConfiguration?, FormattingRules?, CancellationToken)

public static Task ReplaceInstrumentsAsync(WritingDataSource source, InstrumentSet set, InstrumentComponentList components, ChartWritingConfiguration? config = null, FormattingRules? formatting = null, CancellationToken cancellationToken = default)

Parameters

source WritingDataSource
set InstrumentSet
components InstrumentComponentList
config ChartWritingConfiguration
formatting FormattingRules
cancellationToken CancellationToken

Returns

Task

ReplaceMetadata(WritingDataSource, Metadata)

Replaces the metadata in a file.

public static void ReplaceMetadata(WritingDataSource source, Metadata metadata)

Parameters

source WritingDataSource
metadata Metadata

Metadata to write

ReplaceMetadataAsync(WritingDataSource, Metadata, CancellationToken)

public static Task ReplaceMetadataAsync(WritingDataSource source, Metadata metadata, CancellationToken cancellationToken = default)

Parameters

source WritingDataSource
metadata Metadata
cancellationToken CancellationToken

Returns

Task

ReplaceSyncTrack(WritingDataSource, SyncTrack, ChartWritingConfiguration?)

Replaces the sync track in a file.

public static void ReplaceSyncTrack(WritingDataSource source, SyncTrack syncTrack, ChartWritingConfiguration? config = null)

Parameters

source WritingDataSource
syncTrack SyncTrack

Sync track to write

config ChartWritingConfiguration

ReplaceSyncTrackAsync(WritingDataSource, SyncTrack, ChartWritingConfiguration?, CancellationToken)

public static Task ReplaceSyncTrackAsync(WritingDataSource source, SyncTrack syncTrack, ChartWritingConfiguration? config = null, CancellationToken cancellationToken = default)

Parameters

source WritingDataSource
syncTrack SyncTrack
config ChartWritingConfiguration
cancellationToken CancellationToken

Returns

Task

WriteSong(WritingDataSource, Song, ChartWritingConfiguration?)

Writes a song to a chart file.

public static void WriteSong(WritingDataSource source, Song song, ChartWritingConfiguration? config = null)

Parameters

source WritingDataSource
song Song

Song to write

config ChartWritingConfiguration

WriteSong(Stream, Song, ChartWritingConfiguration?)

public static void WriteSong(Stream stream, Song song, ChartWritingConfiguration? config = null)

Parameters

stream Stream
song Song
config ChartWritingConfiguration

WriteSong(string, Song, ChartWritingConfiguration?)

public static void WriteSong(string path, Song song, ChartWritingConfiguration? config = null)

Parameters

path string
song Song
config ChartWritingConfiguration

WriteSongAsync(WritingDataSource, Song, ChartWritingConfiguration?, CancellationToken)

public static Task WriteSongAsync(WritingDataSource source, Song song, ChartWritingConfiguration? config = null, CancellationToken cancellationToken = default)

Parameters

source WritingDataSource
song Song
config ChartWritingConfiguration
cancellationToken CancellationToken

Returns

Task

WriteSongAsync(Stream, Song, ChartWritingConfiguration?, CancellationToken)

public static Task WriteSongAsync(Stream stream, Song song, ChartWritingConfiguration? config = null, CancellationToken cancellationToken = default)

Parameters

stream Stream
song Song
config ChartWritingConfiguration
cancellationToken CancellationToken

Returns

Task

WriteSongAsync(string, Song, ChartWritingConfiguration?, CancellationToken)

public static Task WriteSongAsync(string path, Song song, ChartWritingConfiguration? config = null, CancellationToken cancellationToken = default)

Parameters

path string
song Song
config ChartWritingConfiguration
cancellationToken CancellationToken

Returns

Task