Exemplo n.º 1
0
        //--------
        protected CommonBluetoothListener(BluetoothFactory factory)
        {
#if DEBUG && !PocketPC
            _creationStackTrace = Environment.StackTrace;
#endif
            m_factory = factory;
            GC.SuppressFinalize(this); // Finalization only needed for IRfcommIf.
        }
Exemplo n.º 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 }));
     }
 }
Exemplo n.º 3
0
 protected CommonBluetoothClient(BluetoothFactory factory, CommonRfcommStream conn)
 {
     Debug.Assert(factory != null, "NULL factory");
     _fcty  = factory;
     m_conn = new BluetoothRfcommStreamConnector(this, conn);
 }