IResourceSupplier IResourceSupplier IResourceSupplier Interface


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

public interface IResourceSupplier
type IResourceSupplier = interface
Public Interface IResourceSupplier


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.


GetResourceString(String, String) GetResourceString(String, String) GetResourceString(String, String)

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

Applies to