2015-06-25 8 views
13

ottengo una linea rossa sotto la mia await nel mio codice dicendo: The type arguments for method 'TaskAwaiter<TResult> System.WindowsRuntimeSystemExtensions.GetAwaiter<TResult>(this Windows.Foundation.IAsyncOperation 1)' cannot be inferred from the usage. Try specifying the type arguments explicitlyTaskAwaiter non si può dedurre dall'uso

Anche se il codice viene compilato e sembra funzionare bene, mi chiedo cosa significa questo? (L'inglese non è la mia prima lingua, quindi potrebbe non solo capire il messaggio)

private async void Init() 
{ 
    var settings = new I2cConnectionSettings(I2CAddress); 
    settings.BusSpeed = I2cBusSpeed.StandardMode; 

    var aqs = I2cDevice.GetDeviceSelector(I2CControllerName); 
    var dis = await DeviceInformation.FindAllAsync(aqs); 
    _device = await I2cDevice.FromIdAsync(dis[0].Id, settings); 
    _isInited = true; 
} 
+0

suona come un errore nella libreria che si sta utilizzando, la deve utilizzare una specie di cameriere personalizzato. –

+1

Che tipo è 'DeviceInformation' e' l2cDevice'? –

+3

Ok, potrebbe valere la pena ricordare che sto utilizzando VS2015RC, quindi credo che potrebbe anche essere un bug. –

risposta

3

ReSharper Aggiornato alla versione più recente, problema risolto

Problemi correlati