IResourceSupplier Interface

Definition

Objects implementing this interface can be used by System.Management.Automation.ErrorDetails.

public interface IResourceSupplier
Derived

Remarks

CmdletProvider implements this interface. PSSnapins can implement IResourceSupplier on their custom classes, but the only purpose would be to permit the custom class to be used in the System.Management.Automation.ErrorDetails.. constructor.

        <xref href="System.Management.Automation.ErrorDetails"></xref> contains special constructor
        <xref href="System.Management.Automation.ErrorDetails.#ctor(System.Management.Automation.IResourceSupplier,System.String,System.String,System.Object[])"></xref>
        reducing the steps which localizable code generally has to duplicate when it
        generates a localizable string.  This variant is preferred over
        <xref href="System.Management.Automation.ErrorDetails.#ctor(System.String)"></xref>,
        since the improved
        information about the error may help enable future scenarios.

Methods

GetResourceString(String, String)

Gets the error message template string corresponding to baseName and resourceId.