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