public static BaseGpsClient Create(BaseGpsInfo baseGpsData) { if (baseGpsData.GetType() == typeof(FileGpsInfo)) { return(new FileGpsClient(baseGpsData)); } if (baseGpsData.GetType() == typeof(ComPortInfo)) { return(new ComPortGpsClient(baseGpsData)); } if (baseGpsData.GetType() == typeof(GpsdInfo)) { return(new GpsdGpsClient(baseGpsData)); } if (baseGpsData.GetType() == typeof(WindowsLocationApiInfo)) { return(new WindowsLocationApiGpsClient(baseGpsData)); } throw new UnknownTypeException(baseGpsData.GetType()); }
public ComPortGpsClient(BaseGpsInfo connectionData) : base(GpsType.ComPort, connectionData) { }
public WindowsLocationApiGpsClient(BaseGpsInfo connectionData) : base(GpsType.WindowsLocationApi, connectionData) { }
protected BaseGpsClient(GpsType gpsType, BaseGpsInfo gpsInfo) { GpsType = gpsType; GpsInfo = gpsInfo; }
public GpsService(BaseGpsInfo baseGpsData) { _client = GpsClientFactory.Create(baseGpsData); }
public GpsdGpsClient(BaseGpsInfo connectionData) : base(GpsType.Gpsd, connectionData) { }
public FileGpsClient(BaseGpsInfo connectionData) : base(GpsType.File, connectionData) { }