示例#1
0
        //--------
        protected CommonBluetoothListener(BluetoothFactory factory)
        {
#if DEBUG && !PocketPC
            _creationStackTrace = Environment.StackTrace;
#endif
            m_factory = factory;
            GC.SuppressFinalize(this); // Finalization only needed for IRfcommIf.
        }
示例#2
0
 internal static void SetFactory(BluetoothFactory factory)
 {
     if (factory == null)
     {
         throw new ArgumentNullException("factory");
     }
     lock (lockKey) {
         Debug.WriteLine("SetFactory: " + factory == null ? "(null)" : factory.GetType().Name);
         if (!TestUtilities.IsUnderTestHarness())
         {
             Debug.Assert(s_factories == null, "Shouldn't change the factory.");
             //    throw new InvalidOperationException("Can't change the factory.");
         }
         SetFactories_inLock(new List_BluetoothFactory(new BluetoothFactory[] { factory }));
     }
 }
示例#3
0
 protected CommonBluetoothClient(BluetoothFactory factory, CommonRfcommStream conn)
 {
     Debug.Assert(factory != null, "NULL factory");
     _fcty  = factory;
     m_conn = new BluetoothRfcommStreamConnector(this, conn);
 }