TextTransformation<TTemplate> Class

Summary

Provides functionality to perform simple text transformations from a Cake build script and save them to disc.
Namespace
Cake.Common.Text
Base Types
  • object
graph BT Type-->Base0["object"] Type["TextTransformation<TTemplate>"] class Type type-node

Syntax

public sealed class TextTransformation<TTemplate> 
    where TTemplate : class, ITextTransformationTemplate

Type Parameters

Name Description
TTemplate The text transformation template.

Constructors

Properties

Name Value Summary
Template TTemplate
Gets the text transformation template.

Methods

Name Value Summary
Save(FilePath) void
Saves the text transformation to a file.
Save(FilePath, Encoding) void
Saves the text transformation to a file.
ToString() string
Returns a string containing the rendered template.

Extension Methods

Name Value Summary
Dump<TextTransformation<TTemplate>>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<TextTransformation<TTemplate>>(TextTransformation<TTemplate>[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<TextTransformation<TTemplate>>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<TextTransformation<TTemplate>>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<TextTransformation<TTemplate>>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<TextTransformation<TTemplate>>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
WithToken<TTemplate>(string, object) TextTransformation<TTemplate>
Registers a key and a value to be used with the text transformation.
WithTokens<TTemplate>(IEnumerable<KeyValuePair<string, object>>) TextTransformation<TTemplate>
Registers all keys and values in the enumerable for text transformation.