TestimoX

API Reference

Class

ModuleInfo

Namespace TestimoX.PowerShell
Assembly TestimoX

Information about a loaded PowerShell module.

Inheritance

  • Object
  • ModuleInfo

Remarks

Instances of this class are returned by module loading strategies to describe the outcome of importing a module.

Examples


var info = new ModuleInfo("DnsServer", "2.0", true);
Console.WriteLine($"Loaded {info.Name} version {info.Version}");

        

Constructors

public ModuleInfo(String name, String version, Boolean isLoaded, IReadOnlyList<String> dependencies = null) #

Initializes a new instance of the ModuleInfo class.

Parameters

name System.String requiredposition: 0
Module name.
version System.String requiredposition: 1
Module version.
isLoaded System.Boolean requiredposition: 2
Indicates whether the module is loaded.
dependencies System.Collections.Generic.IReadOnlyList{System.String} = null optionalposition: 3
Optional dependencies.

Properties

public String Name { get; } #

Name of the module.

public String Version { get; } #

Version of the module if available.

public Boolean IsLoaded { get; set; } #

Indicates whether the module has been successfully loaded.

public IReadOnlyList<String> Dependencies { get; } #

Module dependencies.