static void SetReleaseAvailableCallback(ReleaseAvailableCallback releaseAvailableCallback)
 {
     lock (typeof(Distribute))
     {
         _releaseAvailableCallback = releaseAvailableCallback;
         if (_delegate == null && _releaseAvailableCallback != null)
         {
             _delegate = new Delegate();
             MSDistribute.SetDelegate(_delegate);
         }
     }
 }
        static void HandleUpdateAction(UpdateAction updateAction)
        {
            switch (updateAction)
            {
            case UpdateAction.Update:
                MSDistribute.NotifyUpdateAction(MSUpdateAction.Update);
                break;

            case UpdateAction.Postpone:
                MSDistribute.NotifyUpdateAction(MSUpdateAction.Postpone);
                break;
            }
        }
 public override bool OnReleaseAvailable(MSDistribute distribute, MSReleaseDetails details)
 {
     if (_releaseAvailableCallback != null)
     {
         Uri releaseNotesUrl = null;
         if (details.ReleaseNotesUrl != null)
         {
             releaseNotesUrl = new Uri(details.ReleaseNotesUrl.ToString());
         }
         var releaseDetails = new ReleaseDetails
         {
             Id              = details.Id,
             ShortVersion    = details.ShortVersion,
             Version         = details.Version,
             ReleaseNotes    = details.ReleaseNotes,
             ReleaseNotesUrl = releaseNotesUrl,
             MandatoryUpdate = details.MandatoryUpdate
         };
         return(_releaseAvailableCallback(releaseDetails));
     }
     return(false);
 }
 /// <summary>
 /// Process URL request for the Distribute service.
 /// Place this method call into app delegate openUrl method.
 /// </summary>
 /// <param name="url">The url with parameters.</param>
 public static void OpenUrl(NSUrl url)
 {
     MSDistribute.OpenUrl(url);
 }
 static void PlatformSetApiUrl(string apiUrl)
 {
     MSDistribute.SetApiUrl(apiUrl);
 }
 static void PlatformSetInstallUrl(string installUrl)
 {
     MSDistribute.SetInstallUrl(installUrl);
 }
Ejemplo n.º 7
0
 static Task <bool> PlatformIsEnabledAsync()
 {
     return(Task.FromResult(MSDistribute.IsEnabled()));
 }
Ejemplo n.º 8
0
 static Task PlatformSetEnabledAsync(bool enabled)
 {
     MSDistribute.SetEnabled(enabled);
     return(Task.FromResult(default(object)));
 }
Ejemplo n.º 9
0
 private static void PlatformUnsetInstance()
 {
     MSDistribute.ResetSharedInstance();
 }
Ejemplo n.º 10
0
        static UpdateTrack GetUpdateTrack()
        {
            var updateTrackValue = (int)MSDistribute.GetUpdateTrack();

            return((UpdateTrack)updateTrackValue);
        }
Ejemplo n.º 11
0
        static void SetUpdateTrack(UpdateTrack updateTrack)
        {
            var updateTrackValue = (int)updateTrack;

            MSDistribute.SetUpdateTrack((MSUpdateTrack)updateTrackValue);
        }
Ejemplo n.º 12
0
 static void PlatformDisableAutomaticCheckForUpdate()
 {
     MSDistribute.DisableAutomaticCheckForUpdate();
 }
Ejemplo n.º 13
0
 static void PlatformCheckForUpdate()
 {
     MSDistribute.CheckForUpdate();
 }