teotestbluetooth / TestXamConnections / TestXamConnections.Android / Helper / ConnexionServiceFournisseur.cs @ master
Historique | Voir | Annoter | Télécharger (956 octets)
1 | 340558f2 | martin.toutant | using TestXamConnections.Connection; |
---|---|---|---|
2 | using TestXamConnections.Droid.Connection; |
||
3 | |||
4 | namespace TestBLE.Droid.Helper |
||
5 | { |
||
6 | public class ConnexionServiceFournisseur : IConnexionServiceFournisseur |
||
7 | { |
||
8 | public IConnexionService GetConnectionServiceInstance(ConnexionType ct) |
||
9 | { |
||
10 | IConnexionService instance = null; |
||
11 | switch (ct) |
||
12 | { |
||
13 | case ConnexionType.Bluetooth: |
||
14 | // instance = BluetoothConnectionService.Instance; |
||
15 | instance = new BluetoothConnexionService(); |
||
16 | break; |
||
17 | |||
18 | case ConnexionType.Intern: |
||
19 | instance = new InternConnexionService(); |
||
20 | break; |
||
21 | |||
22 | case ConnexionType.Wifi: |
||
23 | instance = new WifiConnexionService(); |
||
24 | break; |
||
25 | |||
26 | default: |
||
27 | break; |
||
28 | } |
||
29 | |||
30 | return instance; |
||
31 | } |
||
32 | } |
||
33 | } |