Class PackageExtensions

Namespace
Datamine.MineTrustConnector.Service.Extensibility
Assembly
Datamine.MineTrustConnector.Service.Extensibility.dll

Extension methods for Datamine.MineTrustConnector.Core.PackageConfiguration

public static class PackageExtensions
Inheritance
PackageExtensions
Inherited Members

Methods

ConvertToLocalPath(PackageConfiguration, string?, out bool, out bool)

Converts the specified path to a local path on disk, with respect to the specified Datamine.MineTrustConnector.Core.PackageConfiguration.

public static string ConvertToLocalPath(this PackageConfiguration packageConfiguration, string? maybeRelativePath, out bool isFullyQualified, out bool hasEnvironmentVariable)

Parameters

packageConfiguration PackageConfiguration

The package configuration.

maybeRelativePath string

The maybe relative path.

isFullyQualified bool

if set to true [is fully qualified].

hasEnvironmentVariable bool

if set to true [has environment variable].

Returns

string

The local file path

Exceptions

Exception

Could not convert to local path - because expand environment variables failed to expand in '{maybeRelativePath}'

ConvertToMineTrustPath(PackageConfiguration, string?, out bool, out bool)

Converts the specified path to a remote file path within MineTrust, with respect to the specified Datamine.MineTrustConnector.Core.PackageConfiguration.

public static string ConvertToMineTrustPath(this PackageConfiguration packageConfiguration, string? maybeRelativePath, out bool isFullyQualified, out bool hasEnvironmentVariable)

Parameters

packageConfiguration PackageConfiguration

The package configuration.

maybeRelativePath string

The maybe relative path.

isFullyQualified bool

if set to true [is fully qualified].

hasEnvironmentVariable bool

if set to true [has environment variable].

Returns

string

The remote file path

GetTempFolder(PackageConfiguration)

Gets the temp folder for this package.

public static string GetTempFolder(this PackageConfiguration packageConfiguration)

Parameters

packageConfiguration PackageConfiguration

The package configuration.

Returns

string

A package-specific temp folder.

Exceptions

Exception

Package UID cannot be null

IsSharedPackage(PackageConfiguration)

Determines whether [is shared package]. A package is shared if its Visibility is set to 'Shared'

public static bool IsSharedPackage(this PackageConfiguration packageConfiguration)

Parameters

packageConfiguration PackageConfiguration

The package configuration.

Returns

bool

true if [is shared package] [the specified package configuration]; otherwise, false.