コード例 #1
0
 private YandexAppMetricaRequestDeviceIDError?RequestDeviceIDErrorFromAndroidReason(Com.Yandex.Metrica.AppMetricaDeviceIDListenerReason reason)
 {
     if (reason == null)
     {
         return(null);
     }
     try
     {
         var error = Enum.Parse(typeof(YandexAppMetricaRequestDeviceIDError), reason.ToString());
         return((YandexAppMetricaRequestDeviceIDError?)error);
     }
     catch (ArgumentException)
     {
         return(YandexAppMetricaRequestDeviceIDError.UNKNOWN);
     }
 }
コード例 #2
0
 public void OnError(Com.Yandex.Metrica.AppMetricaDeviceIDListenerReason reason)
 {
     _action.Invoke(null, RequestDeviceIDErrorFromAndroidReason(reason));
 }