Exemple #1
0
 internal WSManUserNameAuthenticationCredentials(
     string name,
     SecureString pwd,
     WSManNativeApi.WSManAuthenticationMechanism authMechanism)
 {
     this.cred = new WSManNativeApi.WSManUserNameAuthenticationCredentials.WSManUserNameCredentialStruct();
     this.cred.authenticationMechanism = authMechanism;
     this.cred.userName = name;
     if (pwd != null)
     {
         this.cred.password = Marshal.SecureStringToGlobalAllocUnicode(pwd);
     }
     this.data = WSManNativeApi.MarshalledObject.Create <WSManNativeApi.WSManUserNameAuthenticationCredentials.WSManUserNameCredentialStruct>(this.cred);
 }
Exemple #2
0
 internal WSManUserNameAuthenticationCredentials()
 {
     this.cred = new WSManNativeApi.WSManUserNameAuthenticationCredentials.WSManUserNameCredentialStruct();
     this.data = WSManNativeApi.MarshalledObject.Create <WSManNativeApi.WSManUserNameAuthenticationCredentials.WSManUserNameCredentialStruct>(this.cred);
 }