internal WSManAPIStaticData() { this.handle = IntPtr.Zero; this.errorCode = WSManNativeApi.WSManInitialize(0, ref this.handle); this.inputStreamSet = new WSManNativeApi.WSManStreamIDSet(new string[2] { "stdin", "pr" }); this.outputStreamSet = new WSManNativeApi.WSManStreamIDSet(new string[1] { "stdout" }); WSManNativeApi.WSManOption wsManOption = new WSManNativeApi.WSManOption(); wsManOption.name = "protocolversion"; wsManOption.value = RemotingConstants.ProtocolVersion.ToString(); wsManOption.mustComply = true; this.commonOptionSet = new List <WSManNativeApi.WSManOption>(); this.commonOptionSet.Add(wsManOption); }
internal WSManAPIStaticData() { this.errorCode = WSManNativeApi.WSManInitialize(1, ref this.handle); this.inputStreamSet = new WSManNativeApi.WSManStreamIDSet(new string[] { "stdin", "pr" }); this.outputStreamSet = new WSManNativeApi.WSManStreamIDSet(new string[] { "stdout" }); WSManNativeApi.WSManOption item = new WSManNativeApi.WSManOption { name = "protocolversion", value = RemotingConstants.ProtocolVersion.ToString(), mustComply = true }; this.commonOptionSet = new List<WSManNativeApi.WSManOption>(); this.commonOptionSet.Add(item); }