Connection.CreateProxy(Module, Type) Method

Definition

Creates a module service proxy.

public:
 Microsoft::Web::Management::Client::ModuleServiceProxy ^ CreateProxy(Microsoft::Web::Management::Client::Module ^ module, Type ^ proxyType);
public Microsoft.Web.Management.Client.ModuleServiceProxy CreateProxy (Microsoft.Web.Management.Client.Module module, Type proxyType);
member this.CreateProxy : Microsoft.Web.Management.Client.Module * Type -> Microsoft.Web.Management.Client.ModuleServiceProxy

Parameters

module
Module

A Module object.

proxyType
Type

The type of the module parameter.

Returns

A ModuleServiceProxy object.

Examples

void doCreateProxy(IServiceProvider sp) {

    Connection con = (Connection)sp.GetService(typeof(Connection));
    _myModSrvProxy = con.CreateProxy(_myModule, typeof(DemoModule));

}

Remarks

The proxyType parameter is passed with the typeof operator.

Applies to