Share via


ManagementPack Constructors

Definition

Initializes a new instance of the ManagementPack class.

Overloads

ManagementPack(String)

Initializes a new instance of the ManagementPack class from the specified file path.

ManagementPack(TextReader, IManagementPackStore)

Initializes a new instance of the ManagementPack class by reading the contents of a management pack from a string by using a TextReader object.

ManagementPack(String, IManagementPackStore)

Initializes a new instance of the ManagementPack class by loading the ManagementPack object from the specified file path.

ManagementPack(String, String[])

Initializes a new instance of the ManagementPack class given the specified file path and directory list.

ManagementPack(String, String, Version, IManagementPackStore)

Initializes a new instance of the ManagementPack class in memory.

ManagementPack(String)

Initializes a new instance of the ManagementPack class from the specified file path.

public:
 ManagementPack(System::String ^ filepath);
public ManagementPack (string filepath);
new Microsoft.EnterpriseManagement.Configuration.ManagementPack : string -> Microsoft.EnterpriseManagement.Configuration.ManagementPack
Public Sub New (filepath As String)

Parameters

filepath
String

The file path of the management pack to load. The file name extension must be .xml or .mp.

Remarks

The ManagementPack constructor assumes that all the references to the management pack being loaded are also available at the same file path. Use other constructor overloads if you want to include other file paths or load management packs from the database.

Applies to

ManagementPack(TextReader, IManagementPackStore)

Initializes a new instance of the ManagementPack class by reading the contents of a management pack from a string by using a TextReader object.

public:
 ManagementPack(System::IO::TextReader ^ mpcontents, Microsoft::EnterpriseManagement::IManagementPackStore ^ storeForReferences);
public ManagementPack (System.IO.TextReader mpcontents, Microsoft.EnterpriseManagement.IManagementPackStore storeForReferences);
new Microsoft.EnterpriseManagement.Configuration.ManagementPack : System.IO.TextReader * Microsoft.EnterpriseManagement.IManagementPackStore -> Microsoft.EnterpriseManagement.Configuration.ManagementPack
Public Sub New (mpcontents As TextReader, storeForReferences As IManagementPackStore)

Parameters

mpcontents
TextReader

The management pack XML content to read.

storeForReferences
IManagementPackStore

The store to load references from. The store is usually represented by a ManagementPackFileStore object when you are working with management packs in the file system or an EnterpriseManagementGroup object when you are working with a SystemCenter-based installation.

Applies to

ManagementPack(String, IManagementPackStore)

Initializes a new instance of the ManagementPack class by loading the ManagementPack object from the specified file path.

public:
 ManagementPack(System::String ^ filepath, Microsoft::EnterpriseManagement::IManagementPackStore ^ storeForReferences);
public ManagementPack (string filepath, Microsoft.EnterpriseManagement.IManagementPackStore storeForReferences);
new Microsoft.EnterpriseManagement.Configuration.ManagementPack : string * Microsoft.EnterpriseManagement.IManagementPackStore -> Microsoft.EnterpriseManagement.Configuration.ManagementPack
Public Sub New (filepath As String, storeForReferences As IManagementPackStore)

Parameters

filepath
String

The file path of the management pack to load.

storeForReferences
IManagementPackStore

The store to load references from. The store is usually represented by a ManagementPackFileStore object when you are working with management packs in the file system or an EnterpriseManagementGroup object when you are working with a SystemCenter-based installation.

Applies to

ManagementPack(String, String[])

Initializes a new instance of the ManagementPack class given the specified file path and directory list.

public:
 ManagementPack(System::String ^ filepath, cli::array <System::String ^> ^ includeDirectories);
public ManagementPack (string filepath, string[] includeDirectories);
new Microsoft.EnterpriseManagement.Configuration.ManagementPack : string * string[] -> Microsoft.EnterpriseManagement.Configuration.ManagementPack
Public Sub New (filepath As String, includeDirectories As String())

Parameters

filepath
String

The path and file name of the management pack. The file name extension must be .xml or .mp.

includeDirectories
String[]

A directory list to search for reference management packs.

Applies to

ManagementPack(String, String, Version, IManagementPackStore)

Initializes a new instance of the ManagementPack class in memory.

public:
 ManagementPack(System::String ^ Name, System::String ^ FriendlyName, Version ^ version, Microsoft::EnterpriseManagement::IManagementPackStore ^ storeForReferences);
public ManagementPack (string Name, string FriendlyName, Version version, Microsoft.EnterpriseManagement.IManagementPackStore storeForReferences);
new Microsoft.EnterpriseManagement.Configuration.ManagementPack : string * string * Version * Microsoft.EnterpriseManagement.IManagementPackStore -> Microsoft.EnterpriseManagement.Configuration.ManagementPack
Public Sub New (Name As String, FriendlyName As String, version As Version, storeForReferences As IManagementPackStore)

Parameters

Name
String

The name of the management pack to create.

FriendlyName
String

The friendly name of the management pack to create. Cannot be null.

version
Version

The version to use for the newly created management pack.

storeForReferences
IManagementPackStore

The store to load references from. The store is usually represented by a ManagementPackFileStore object when you are working with management packs in the file system or an EnterpriseManagementGroup object when you are working with a SystemCenter-based installation.

Applies to