Statistiques
| Branche: | Révision:

teotestbluetooth / TestXamConnections / TestXamConnections.Android / Helper / ConnectionServiceProvider.cs @ c478f8e5

Historique | Voir | Annoter | Télécharger (961 octets)

1 3fa496d6 Martin Toutant
using TestXamConnections.Connection;
2 91ef3e8c Martin Toutant
using TestXamConnections.Droid.Connection;
3
4
namespace TestBLE.Droid.Helper
5
{
6 d14bc0b1 Martin Toutant
    public class ConnectionServiceProvider : IConnectionServiceProvider
7 91ef3e8c Martin Toutant
    {
8 4c7eec22 Martin Toutant
        public IConnectionService GetConnectionServiceInstance(ConnectionType ct)
9 91ef3e8c Martin Toutant
        {
10
            IConnectionService instance = null;
11
            switch (ct)
12
            {
13
                case ConnectionType.Bluetooth:
14 d14bc0b1 Martin Toutant
                    // instance = BluetoothConnectionService.Instance;
15
                    instance = new BluetoothConnectionService();
16 91ef3e8c Martin Toutant
                    break;
17
18
                case ConnectionType.Intern:
19 d14bc0b1 Martin Toutant
                    instance = new InternConnectionService();
20 91ef3e8c Martin Toutant
                    break;
21
22
                case ConnectionType.Wifi:
23 1fd64302 Martin Toutant
                    instance = new WifiConnectionService();
24 91ef3e8c Martin Toutant
                    break;
25
26
                default:
27
                    break;
28
            }
29
30
            return instance;
31
        }
32
    }
33
}