Esempio n. 1
0
        public static void SetDelegate(ISN_iCLLocationManagerDelegate @delegate)
        {
#if API_ENABLED
            _ISN_CL_SetDelegate(
                ISN_MonoPCallback.ActionToIntPtr <int>(result =>
            {
                var auth = (ISN_CLAuthorizationStatus)result;
                @delegate.DidChangeAuthorizationStatus(auth);
            }),
                ISN_MonoPCallback.ActionToIntPtr <ISN_CLLocationArray>(result =>
            {
                @delegate.DidUpdateLocations(result);
            }),
                ISN_MonoPCallback.ActionToIntPtr <SA_Error>(result =>
            {
                @delegate.DidFailWithError(result);
            }),
                ISN_MonoPCallback.ActionToIntPtr <SA_Error>(result =>
            {
                @delegate.DidFinishDeferredUpdatesWithError(result);
            }),
                ISN_MonoPCallback.ActionToIntPtr <int>(result =>
            {
                @delegate.DidPauseLocationUpdates();
            }),
                ISN_MonoPCallback.ActionToIntPtr <int>(result =>
            {
                @delegate.DidResumeLocationUpdates();
            })
                );
#endif
        }
Esempio n. 2
0
 /// <summary>
 /// Set location service delegate.
 /// </summary>
 /// <param name="delegate">The delegate object to receive update events.</param>
 public static void SetDelegate(ISN_iCLLocationManagerDelegate @delegate)
 {
     ISN_CLNativeAPI.SetDelegate(@delegate);
 }