Statistiques
| Branche: | Révision:

teotestbluetooth / TestTeoBluetooth / TestTeoBluetooth.Android / Helper / ConnectionServiceUpdater.cs @ 91ef3e8c

Historique | Voir | Annoter | Télécharger (1,185 ko)

1
using Android.App;
2
using Android.Content;
3
using Android.OS;
4
using Android.Runtime;
5
using Android.Views;
6
using Android.Widget;
7
using System;
8
using System.Collections.Generic;
9
using System.Linq;
10
using System.Text;
11
using System.Threading.Tasks;
12
using TestXamConnections;
13
using TestXamConnections.Connection;
14
using TestXamConnections.Droid.Connection;
15
using TestXamConnections.Helper;
16
using Xamarin.Forms;
17

    
18
namespace TestBLE.Droid.Helper
19
{
20
    public class ConnectionServiceUpdater : IConnectionServiceProvider
21
    {
22
        public IConnectionService GetConnectionInstance(ConnectionType ct)
23
        {
24
            IConnectionService instance = null;
25
            switch (ct)
26
            {
27
                case ConnectionType.Bluetooth:
28
                    instance = BluetoothConnectionService.Instance;
29
                    break;
30

    
31
                case ConnectionType.Intern:
32
                    instance = InternConnectionService.Instance;
33
                    break;
34

    
35
                case ConnectionType.Wifi:
36
                    instance = WifiConnectionService.Instance;
37
                    break;
38

    
39
                default:
40
                    break;
41
            }
42

    
43
            return instance;
44
        }
45
    }
46
}