Class FileTransformer
Represents the file transformer.
Inherited Members
Namespace: Platform.RegularExpressions.Transformer
Assembly: Platform.RegularExpressions.Transformer.dll
Syntax
public class FileTransformer : IFileTransformer, ITransformer
Constructors
| Improve this Doc View SourceFileTransformer(ITextTransformer, String, String)
Initializes a new FileTransformer instance.
Declaration
public FileTransformer(ITextTransformer textTransformer, string sourceFileExtension, string targetFileExtension)
Parameters
| Type | Name | Description |
|---|---|---|
| ITextTransformer | textTransformer | A text transformer.
|
| String | sourceFileExtension | A source file extension.
|
| String | targetFileExtension | A target file extension.
|
Fields
| Improve this Doc View Source_textTransformer
The text transformer.
Declaration
protected readonly ITextTransformer _textTransformer
Field Value
| Type | Description |
|---|---|
| ITextTransformer |
Properties
| Improve this Doc View SourceRules
Gets the rules value.
Declaration
public IList<ISubstitutionRule> Rules { get; }
Property Value
| Type | Description |
|---|---|
| IList<ISubstitutionRule> |
SourceFileExtension
Gets or sets the source file extension value.
Declaration
public string SourceFileExtension { get; }
Property Value
| Type | Description |
|---|---|
| String |
TargetFileExtension
Gets or sets the target file extension value.
Declaration
public string TargetFileExtension { get; }
Property Value
| Type | Description |
|---|---|
| String |
Methods
| Improve this Doc View SourceGetTargetFileName(String, String)
Gets the target file name using the specified source path.
Declaration
protected string GetTargetFileName(string sourcePath, string targetDirectory)
Parameters
| Type | Name | Description |
|---|---|---|
| String | sourcePath | The source path.
|
| String | targetDirectory | The target directory.
|
Returns
| Type | Description |
|---|---|
| String | The string
|
Transform(String, String)
Transforms the source path.
Declaration
public void Transform(string sourcePath, string targetPath)
Parameters
| Type | Name | Description |
|---|---|---|
| String | sourcePath | The source path.
|
| String | targetPath | The target path.
|
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException |
|
TransformFile(String, String)
Transforms the file using the specified source path.
Declaration
protected virtual void TransformFile(string sourcePath, string targetPath)
Parameters
| Type | Name | Description |
|---|---|---|
| String | sourcePath | The source path.
|
| String | targetPath | The target path.
|
TransformFolder(String, String)
Transforms the folder using the specified source path.
Declaration
protected virtual void TransformFolder(string sourcePath, string targetPath)
Parameters
| Type | Name | Description |
|---|---|---|
| String | sourcePath | The source path.
|
| String | targetPath | The target path.
|