Skip to main content

VersionResource Class

A subclass of Resource which provides specific methods for manipulating the resource data.

Methods

MethodDescription
Add(locale)Adds a new version string table for a locale.
Clear()Removes all string tables from the version resource.
Contains(locale)Checks if a version string table exists for a given locale.
CopyTo(array, arrayIndex)Copies the version string tables to an array, starting at a particular array index.
GetEnumerator()Gets an enumerator that can iterate over the version string tables in the collection.
Remove(locale)Removes a version string table for a locale.

Properties

PropertyDescription
BuildTypesGets or sets a bitmask that specifies the build types of the file.
CountGets the number string tables in the version resource.
DataGets or sets the raw data of the resource. The data is in the format of the VS_VERSIONINFO structure.
FileSubtypeGets or sets the specific type of the file.
FileTypeGets or sets the general type of the file.
FileVersionGets or sets the binary locale-independent file version of the version resource.
ItemGets the string table for a specific locale, or null if there is no table for that locale.
ProductVersionGets or sets the binary locale-independent product version of the version resource.
TimestampGets or sets the binary creation date and time.

Remarks

The resource is of type «see P:WixToolset.Dtf.Resources.ResourceType.Version» (RT_VERSION). WixToolset.Dtf.Resources.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

Add(locale) Method

Adds a new version string table for a locale.

Declaration

public VersionStringTable Add(
int locale
)

Parameters

ParameterTypeDescription
localeintLocale of the table

Return value

VersionStringTable The new string table, or the existing table if the locale already existed.

Clear() Method

Removes all string tables from the version resource.

Declaration

public void Clear()

Contains(locale) Method

Checks if a version string table exists for a given locale.

Declaration

public bool Contains(
int locale
)

Parameters

ParameterTypeDescription
localeintLocale to search for

Return value

bool True if a string table was found for the locale; false otherwise.

CopyTo(array, arrayIndex) Method

Copies the version string tables to an array, starting at a particular array index.

Declaration

public void CopyTo(
VersionStringTable[] array,
int arrayIndex
)

Parameters

ParameterTypeDescription
arrayVersionStringTable[]The one-dimensional Array that is the destination of the elements copied from the collection. The Array must have zero-based indexing.
arrayIndexintThe zero-based index in array at which copying begins.

GetEnumerator() Method

Gets an enumerator that can iterate over the version string tables in the collection.

Declaration

public IEnumerator<WixToolset.Dtf.Resources.VersionStringTable> GetEnumerator()

Return value

IEnumerator<WixToolset.Dtf.Resources.VersionStringTable> An enumerator that returns «see T:WixToolset.Dtf.Resources.VersionStringTable» objects.

Remove(locale) Method

Removes a version string table for a locale.

Declaration

public void Remove(
int locale
)

Parameters

ParameterTypeDescription
localeintLocale of the table

BuildTypes Property

Gets or sets a bitmask that specifies the build types of the file.

Declaration

public VersionBuildTypes BuildTypes { get; set; } 

Count Property

Gets the number string tables in the version resource.

Declaration

public int Count { get; set; } 

Data Property

Gets or sets the raw data of the resource. The data is in the format of the VS_VERSIONINFO structure.

Declaration

public System.Byte[] Data { get; set; } 

FileSubtype Property

Gets or sets the specific type of the file.

Declaration

public VersionFileSubtype FileSubtype { get; set; } 

FileType Property

Gets or sets the general type of the file.

Declaration

public VersionFileType FileType { get; set; } 

FileVersion Property

Gets or sets the binary locale-independent file version of the version resource.

Declaration

public System.Version FileVersion { get; set; } 

Item Property

Gets the string table for a specific locale, or null if there is no table for that locale.

Declaration

public VersionStringTable Item { get; set; } 

See also

  • M:WixToolset.Dtf.Resources.VersionResource.Add(System.Int32)
  • M:WixToolset.Dtf.Resources.VersionResource.Remove(System.Int32)

ProductVersion Property

Gets or sets the binary locale-independent product version of the version resource.

Declaration

public System.Version ProductVersion { get; set; } 

Timestamp Property

Gets or sets the binary creation date and time.

Declaration

public System.DateTime Timestamp { get; set; }