C# Класс WixSharp.Files

Defines all files of a given source directory and all subdirectories to be installed on target system.

Use this class to define files to be automatically included into the deployment solution if their name matches specified wildcard character pattern (Files.IncludeMask).

You can use Files.ExcludeMasks to exclude certain files from setup if required.

This class is a logical equivalent of DirFiles except it also analyses all files in all subdirectories. DirFiles excludes files in subdirectories.

Note that all files matching wildcard are resolved into absolute path thus it may not always be suitable if the Wix# script is to be compiled into WiX XML source only (Compiler.WixSharp.Compiler.BuildWxs(WixSharp.Project)). Though it is not a problem at all if the Wix# script is compiled into MSI file (Compiler.Compiler.BuildMsi(WixSharp.Project)).
Наследование: WixEntity
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Directory string
Feature Feature
Filter Predicate
IncludeMask string

Открытые методы

Метод Описание
Files ( ) : System

Initializes a new instance of the Files class.

Files ( Feature feature, string sourcePath ) : System

Initializes a new instance of the Files class with properties/fields initialized with specified parameters.

Files ( Feature feature, string sourcePath, Predicate filter ) : System

Initializes a new instance of the Files class with properties/fields initialized with specified parameters.

Files ( string sourcePath ) : System

Initializes a new instance of the Files class with properties/fields initialized with specified parameters.

Files ( string sourcePath, Predicate filter ) : System

Initializes a new instance of the Files class with properties/fields initialized with specified parameters.

GetAllItems ( string baseDirectory ) : WixEntity[]

Analyses baseDirectory and returns all files (including subdirectories) matching Files.IncludeMask, which are not matching any Files.ExcludeMasks.

Описание методов

Files() публичный Метод

Initializes a new instance of the Files class.
public Files ( ) : System
Результат System

Files() публичный Метод

Initializes a new instance of the Files class with properties/fields initialized with specified parameters.
public Files ( Feature feature, string sourcePath ) : System
feature Feature the directory files should be included in.
sourcePath string The relative path to source directory. It must include wildcard pattern for files to be included /// into MSI (e.g. new Files(@"Release\Bin\*.*")).
Результат System

Files() публичный Метод

Initializes a new instance of the Files class with properties/fields initialized with specified parameters.
public Files ( Feature feature, string sourcePath, Predicate filter ) : System
feature Feature the directory files should be included in.
sourcePath string The relative path to source directory. It must include wildcard pattern for files to be included /// into MSI (e.g. new Files(@"Release\Bin\*.*")).
filter Predicate Filter to be applied for every file to be evaluated for the inclusion into MSI. /// (e.g. new Files(typical, @"Release\Bin\*.dll", f => !f.EndsWith(".Test.dll"))).
Результат System

Files() публичный Метод

Initializes a new instance of the Files class with properties/fields initialized with specified parameters.
public Files ( string sourcePath ) : System
sourcePath string The relative path to source directory. It must include wildcard pattern for files to be included /// into MSI (e.g. new Files(@"Release\Bin\*.*")).
Результат System

Files() публичный Метод

Initializes a new instance of the Files class with properties/fields initialized with specified parameters.
public Files ( string sourcePath, Predicate filter ) : System
sourcePath string The relative path to source directory. It must include wildcard pattern for files to be included /// into MSI (e.g. new Files(@"Release\Bin\*.*")).
filter Predicate Filter to be applied for every file to be evaluated for the inclusion into MSI. /// (e.g. new Files(typical, @"Release\Bin\*.dll", f => !f.EndsWith(".Test.dll"))).
Результат System

GetAllItems() публичный Метод

Analyses baseDirectory and returns all files (including subdirectories) matching Files.IncludeMask, which are not matching any Files.ExcludeMasks.
public GetAllItems ( string baseDirectory ) : WixEntity[]
baseDirectory string The base directory for file analysis. It is used in conjunction with /// relative . Though takes precedence if it is an absolute path.
Результат WixEntity[]

Описание свойств

Directory публичное свойство

The relative path to source directory to search for files matching the Files.IncludeMask.
public string Directory
Результат string

Feature публичное свойство

the files belongs to.
public Feature,WixSharp Feature
Результат Feature

Filter публичное свойство

The filter delegate. It is applied for every file to be evaluated for the inclusion into MSI.
public Predicate Filter
Результат Predicate

IncludeMask публичное свойство

Wildcard pattern for files to be included into MSI.

Default value is *.*.

public string IncludeMask
Результат string