Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
     }
 }