@@ -33,7 +33,7 @@ namespace System.Management.Automation.Remoting
33
33
/// <param name="extraInfo">PCWSTR.</param>
34
34
/// <param name="startupInfo">WSMAN_SHELL_STARTUP_INFO*.</param>
35
35
/// <param name="inboundShellInformation">WSMAN_DATA*.</param>
36
- internal delegate void WSMPluginShellDelegate ( // TODO: Rename to WSManPluginShellDelegate once I remove the MC++ module.
36
+ internal delegate void WSManPluginShellDelegate (
37
37
IntPtr pluginContext ,
38
38
IntPtr requestDetails ,
39
39
int flags ,
@@ -45,7 +45,7 @@ internal delegate void WSMPluginShellDelegate( // TODO: Rename to WSManPluginShe
45
45
/// </summary>
46
46
/// <param name="pluginContext">PVOID.</param>
47
47
/// <param name="shellContext">PVOID.</param>
48
- internal delegate void WSMPluginReleaseShellContextDelegate (
48
+ internal delegate void WSManPluginReleaseShellContextDelegate (
49
49
IntPtr pluginContext ,
50
50
IntPtr shellContext ) ;
51
51
@@ -57,7 +57,7 @@ internal delegate void WSMPluginReleaseShellContextDelegate(
57
57
/// <param name="shellContext">PVOID.</param>
58
58
/// <param name="commandContext">PVOID optional.</param>
59
59
/// <param name="inboundConnectInformation">WSMAN_DATA* optional.</param>
60
- internal delegate void WSMPluginConnectDelegate (
60
+ internal delegate void WSManPluginConnectDelegate (
61
61
IntPtr pluginContext ,
62
62
IntPtr requestDetails ,
63
63
int flags ,
@@ -73,7 +73,7 @@ internal delegate void WSMPluginConnectDelegate(
73
73
/// <param name="shellContext">PVOID.</param>
74
74
/// <param name="commandLine">PCWSTR.</param>
75
75
/// <param name="arguments">WSMAN_COMMAND_ARG_SET*.</param>
76
- internal delegate void WSMPluginCommandDelegate (
76
+ internal delegate void WSManPluginCommandDelegate (
77
77
IntPtr pluginContext ,
78
78
IntPtr requestDetails ,
79
79
int flags ,
@@ -85,15 +85,15 @@ internal delegate void WSMPluginCommandDelegate(
85
85
/// Delegate that is passed to native layer for callback on operation shutdown notifications.
86
86
/// </summary>
87
87
/// <param name="shutdownContext">IntPtr.</param>
88
- internal delegate void WSMPluginOperationShutdownDelegate (
88
+ internal delegate void WSManPluginOperationShutdownDelegate (
89
89
IntPtr shutdownContext ) ;
90
90
91
91
/// <summary>
92
92
/// </summary>
93
93
/// <param name="pluginContext">PVOID.</param>
94
94
/// <param name="shellContext">PVOID.</param>
95
95
/// <param name="commandContext">PVOID.</param>
96
- internal delegate void WSMPluginReleaseCommandContextDelegate (
96
+ internal delegate void WSManPluginReleaseCommandContextDelegate (
97
97
IntPtr pluginContext ,
98
98
IntPtr shellContext ,
99
99
IntPtr commandContext ) ;
@@ -107,7 +107,7 @@ internal delegate void WSMPluginReleaseCommandContextDelegate(
107
107
/// <param name="commandContext">PVOID.</param>
108
108
/// <param name="stream">PCWSTR.</param>
109
109
/// <param name="inboundData">WSMAN_DATA*.</param>
110
- internal delegate void WSMPluginSendDelegate (
110
+ internal delegate void WSManPluginSendDelegate (
111
111
IntPtr pluginContext ,
112
112
IntPtr requestDetails ,
113
113
int flags ,
@@ -124,7 +124,7 @@ internal delegate void WSMPluginSendDelegate(
124
124
/// <param name="shellContext">PVOID.</param>
125
125
/// <param name="commandContext">PVOID optional.</param>
126
126
/// <param name="streamSet">WSMAN_STREAM_ID_SET* optional.</param>
127
- internal delegate void WSMPluginReceiveDelegate (
127
+ internal delegate void WSManPluginReceiveDelegate (
128
128
IntPtr pluginContext ,
129
129
IntPtr requestDetails ,
130
130
int flags ,
@@ -140,7 +140,7 @@ internal delegate void WSMPluginReceiveDelegate(
140
140
/// <param name="shellContext">PVOID.</param>
141
141
/// <param name="commandContext">PVOID optional.</param>
142
142
/// <param name="code">PCWSTR.</param>
143
- internal delegate void WSMPluginSignalDelegate (
143
+ internal delegate void WSManPluginSignalDelegate (
144
144
IntPtr pluginContext ,
145
145
IntPtr requestDetails ,
146
146
int flags ,
@@ -160,7 +160,7 @@ internal delegate void WaitOrTimerCallbackDelegate(
160
160
/// <summary>
161
161
/// </summary>
162
162
/// <param name="pluginContext">PVOID.</param>
163
- internal delegate void WSMShutdownPluginDelegate (
163
+ internal delegate void WSManShutdownPluginDelegate (
164
164
IntPtr pluginContext ) ;
165
165
166
166
/// <summary>
@@ -192,7 +192,7 @@ internal WSManPluginEntryDelegatesInternal UnmanagedStruct
192
192
private GCHandle _pluginSignalGCHandle ;
193
193
private GCHandle _pluginConnectGCHandle ;
194
194
private GCHandle _shutdownPluginGCHandle ;
195
- private GCHandle _WSMPluginOperationShutdownGCHandle ;
195
+ private GCHandle _WSManPluginOperationShutdownGCHandle ;
196
196
197
197
#endregion
198
198
@@ -255,57 +255,57 @@ private void populateDelegates()
255
255
// disposal. Using GCHandle without pinning reduces fragmentation potential
256
256
// of the managed heap.
257
257
{
258
- WSMPluginShellDelegate pluginShell = new WSMPluginShellDelegate ( WSManPluginManagedEntryWrapper . WSManPluginShell ) ;
258
+ WSManPluginShellDelegate pluginShell = new WSManPluginShellDelegate ( WSManPluginManagedEntryWrapper . WSManPluginShell ) ;
259
259
_pluginShellGCHandle = GCHandle . Alloc ( pluginShell ) ;
260
260
// marshal the delegate to a unmanaged function pointer so that AppDomain reference is stored correctly.
261
261
// Populate the outgoing structure so the caller has access to the entry points
262
262
_unmanagedStruct . wsManPluginShellCallbackNative = Marshal . GetFunctionPointerForDelegate ( pluginShell ) ;
263
263
}
264
264
{
265
- WSMPluginReleaseShellContextDelegate pluginReleaseShellContext = new WSMPluginReleaseShellContextDelegate ( WSManPluginManagedEntryWrapper . WSManPluginReleaseShellContext ) ;
265
+ WSManPluginReleaseShellContextDelegate pluginReleaseShellContext = new WSManPluginReleaseShellContextDelegate ( WSManPluginManagedEntryWrapper . WSManPluginReleaseShellContext ) ;
266
266
_pluginReleaseShellContextGCHandle = GCHandle . Alloc ( pluginReleaseShellContext ) ;
267
267
_unmanagedStruct . wsManPluginReleaseShellContextCallbackNative = Marshal . GetFunctionPointerForDelegate ( pluginReleaseShellContext ) ;
268
268
}
269
269
{
270
- WSMPluginCommandDelegate pluginCommand = new WSMPluginCommandDelegate ( WSManPluginManagedEntryWrapper . WSManPluginCommand ) ;
270
+ WSManPluginCommandDelegate pluginCommand = new WSManPluginCommandDelegate ( WSManPluginManagedEntryWrapper . WSManPluginCommand ) ;
271
271
_pluginCommandGCHandle = GCHandle . Alloc ( pluginCommand ) ;
272
272
_unmanagedStruct . wsManPluginCommandCallbackNative = Marshal . GetFunctionPointerForDelegate ( pluginCommand ) ;
273
273
}
274
274
{
275
- WSMPluginReleaseCommandContextDelegate pluginReleaseCommandContext = new WSMPluginReleaseCommandContextDelegate ( WSManPluginManagedEntryWrapper . WSManPluginReleaseCommandContext ) ;
275
+ WSManPluginReleaseCommandContextDelegate pluginReleaseCommandContext = new WSManPluginReleaseCommandContextDelegate ( WSManPluginManagedEntryWrapper . WSManPluginReleaseCommandContext ) ;
276
276
_pluginReleaseCommandContextGCHandle = GCHandle . Alloc ( pluginReleaseCommandContext ) ;
277
277
_unmanagedStruct . wsManPluginReleaseCommandContextCallbackNative = Marshal . GetFunctionPointerForDelegate ( pluginReleaseCommandContext ) ;
278
278
}
279
279
{
280
- WSMPluginSendDelegate pluginSend = new WSMPluginSendDelegate ( WSManPluginManagedEntryWrapper . WSManPluginSend ) ;
280
+ WSManPluginSendDelegate pluginSend = new WSManPluginSendDelegate ( WSManPluginManagedEntryWrapper . WSManPluginSend ) ;
281
281
_pluginSendGCHandle = GCHandle . Alloc ( pluginSend ) ;
282
282
_unmanagedStruct . wsManPluginSendCallbackNative = Marshal . GetFunctionPointerForDelegate ( pluginSend ) ;
283
283
}
284
284
{
285
- WSMPluginReceiveDelegate pluginReceive = new WSMPluginReceiveDelegate ( WSManPluginManagedEntryWrapper . WSManPluginReceive ) ;
285
+ WSManPluginReceiveDelegate pluginReceive = new WSManPluginReceiveDelegate ( WSManPluginManagedEntryWrapper . WSManPluginReceive ) ;
286
286
_pluginReceiveGCHandle = GCHandle . Alloc ( pluginReceive ) ;
287
287
_unmanagedStruct . wsManPluginReceiveCallbackNative = Marshal . GetFunctionPointerForDelegate ( pluginReceive ) ;
288
288
}
289
289
{
290
- WSMPluginSignalDelegate pluginSignal = new WSMPluginSignalDelegate ( WSManPluginManagedEntryWrapper . WSManPluginSignal ) ;
290
+ WSManPluginSignalDelegate pluginSignal = new WSManPluginSignalDelegate ( WSManPluginManagedEntryWrapper . WSManPluginSignal ) ;
291
291
_pluginSignalGCHandle = GCHandle . Alloc ( pluginSignal ) ;
292
292
_unmanagedStruct . wsManPluginSignalCallbackNative = Marshal . GetFunctionPointerForDelegate ( pluginSignal ) ;
293
293
}
294
294
{
295
- WSMPluginConnectDelegate pluginConnect = new WSMPluginConnectDelegate ( WSManPluginManagedEntryWrapper . WSManPluginConnect ) ;
295
+ WSManPluginConnectDelegate pluginConnect = new WSManPluginConnectDelegate ( WSManPluginManagedEntryWrapper . WSManPluginConnect ) ;
296
296
_pluginConnectGCHandle = GCHandle . Alloc ( pluginConnect ) ;
297
297
_unmanagedStruct . wsManPluginConnectCallbackNative = Marshal . GetFunctionPointerForDelegate ( pluginConnect ) ;
298
298
}
299
299
{
300
- WSMShutdownPluginDelegate shutdownPlugin = new WSMShutdownPluginDelegate ( WSManPluginManagedEntryWrapper . ShutdownPlugin ) ;
300
+ WSManShutdownPluginDelegate shutdownPlugin = new WSManShutdownPluginDelegate ( WSManPluginManagedEntryWrapper . ShutdownPlugin ) ;
301
301
_shutdownPluginGCHandle = GCHandle . Alloc ( shutdownPlugin ) ;
302
302
_unmanagedStruct . wsManPluginShutdownPluginCallbackNative = Marshal . GetFunctionPointerForDelegate ( shutdownPlugin ) ;
303
303
}
304
304
305
305
if ( ! Platform . IsWindows )
306
306
{
307
- WSMPluginOperationShutdownDelegate pluginShutDownDelegate = new WSMPluginOperationShutdownDelegate ( WSManPluginManagedEntryWrapper . WSManPSShutdown ) ;
308
- _WSMPluginOperationShutdownGCHandle = GCHandle . Alloc ( pluginShutDownDelegate ) ;
307
+ WSManPluginOperationShutdownDelegate pluginShutDownDelegate = new WSManPluginOperationShutdownDelegate ( WSManPluginManagedEntryWrapper . WSManPSShutdown ) ;
308
+ _WSManPluginOperationShutdownGCHandle = GCHandle . Alloc ( pluginShutDownDelegate ) ;
309
309
_unmanagedStruct . wsManPluginShutdownCallbackNative = Marshal . GetFunctionPointerForDelegate ( pluginShutDownDelegate ) ;
310
310
}
311
311
}
@@ -328,7 +328,7 @@ private void CleanUpDelegates()
328
328
_shutdownPluginGCHandle . Free ( ) ;
329
329
if ( ! Platform . IsWindows )
330
330
{
331
- _WSMPluginOperationShutdownGCHandle . Free ( ) ;
331
+ _WSManPluginOperationShutdownGCHandle . Free ( ) ;
332
332
}
333
333
}
334
334
}
0 commit comments