Statistiques
| Branche: | Révision:

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

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

1
using TestXamConnections.Connection;
2
using TestXamConnections.Droid.Connection;
3

    
4
namespace TestBLE.Droid.Helper
5
{
6
    public class ConnectionServiceProvider : IConnectionServiceProvider
7
    {
8
        public IConnectionService GetConnectionServiceInstance(ConnectionType ct)
9
        {
10
            IConnectionService instance = null;
11
            switch (ct)
12
            {
13
                case ConnectionType.Bluetooth:
14
                    // instance = BluetoothConnectionService.Instance;
15
                    instance = new BluetoothConnectionService();
16
                    break;
17

    
18
                case ConnectionType.Intern:
19
                    instance = new InternConnectionService();
20
                    break;
21

    
22
                case ConnectionType.Wifi:
23
                    instance = new WifiConnectionService();
24
                    break;
25

    
26
                default:
27
                    break;
28
            }
29

    
30
            return instance;
31
        }
32
    }
33
}