Example #1
0
 public MCSession(MCPeerID myPeerID, SecIdentity identity, MCEncryptionPreference encryptionPreference)
     : base(NSObjectFlag.Empty)
 {
     if (identity == null) {
         Handle = Init (myPeerID, null, encryptionPreference);
     } else {
         using (var a = NSArray.FromNSObjects (identity))
             Handle = Init (myPeerID, a, encryptionPreference);
     }
 }
Example #2
0
 public MCSession(MCPeerID myPeerID, SecIdentity identity, SecCertificate[] certificates, MCEncryptionPreference encryptionPreference)
     : base(NSObjectFlag.Empty)
 {
     if (identity == null) {
         if (certificates == null)
             Handle = Init (myPeerID, null, encryptionPreference);
         else
             throw new ArgumentNullException ("identity");
     } else {
         using (var certs = NSArray.FromNativeObjects (certificates))
             Handle = Init (myPeerID, certs, encryptionPreference);
     }
 }
Example #3
0
 public MCSession(MCPeerID myPeerID, SecIdentity identity, MCEncryptionPreference encryptionPreference)
     : base(NSObjectFlag.Empty)
 {
     if (identity == null)
     {
         Handle = Init(myPeerID, null, encryptionPreference);
     }
     else
     {
         using (var a = NSArray.FromNSObjects(identity))
             Handle = Init(myPeerID, a, encryptionPreference);
     }
 }
Example #4
0
 public MCSession(MCPeerID myPeerID, SecIdentity identity, SecCertificate[] certificates, MCEncryptionPreference encryptionPreference)
     : base(NSObjectFlag.Empty)
 {
     if (identity == null)
     {
         if (certificates == null)
         {
             Handle = Init(myPeerID, null, encryptionPreference);
         }
         else
         {
             throw new ArgumentNullException("identity");
         }
     }
     else
     {
         using (var certs = NSArray.FromNativeObjects(certificates))
             Handle = Init(myPeerID, certs, encryptionPreference);
     }
 }