From 5ffd8ee946ee8eed00853c927abeeb7d022b7096 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Thu, 15 Jun 2017 19:56:01 -0700 Subject: [PATCH 01/60] Embed async android SDK and change get APIs to async --- .../MainActivity.cs | 2 - .../Contoso.Forms.Puppet/App.xaml.cs | 15 ++- .../ModulePages/AnalyticsContentPage.xaml.cs | 8 +- .../ModulePages/CrashesContentPage.xaml.cs | 8 +- .../MobileCenterContentPage.xaml.cs | 7 +- .../ModulePages/OthersContentPage.xaml.cs | 13 +-- .../Consumer.cs | 27 ++++++ .../Microsoft.Azure.Mobile.Android.csproj | 1 + .../MobileCenter.cs | 87 +++++------------ .../MobileCenter.cs | 94 +++++++++++++++++++ .../MobileCenter.cs | 70 ++++---------- .../Microsoft.Azure.Mobile/MobileCenter.cs | 72 +++++--------- .../Analytics.cs | 19 +++- .../Analytics.cs | 17 +++- .../Analytics.cs | 16 +++- .../PlatformCrashes.cs | 52 +++++----- .../Crashes.cs | 27 ++++-- .../IPlatformCrashes.cs | 8 +- .../PlatformCrashesBase.cs | 6 +- .../PlatformCrashes.cs | 15 ++- .../PlatformCrashes.cs | 14 ++- .../Distribute.cs | 18 ++-- ...oft.Azure.Mobile.Distribute.Android.csproj | 4 + .../Distribute.cs | 23 ++--- .../Distribute.cs | 16 ++-- .../Distribute.cs | 13 ++- ...Microsoft.Azure.Mobile.Push.Android.csproj | 4 + .../Push.cs | 13 ++- .../Push.cs | 17 +++- .../Microsoft.Azure.Mobile.Push.iOS/Push.cs | 13 ++- .../Microsoft.Azure.Mobile.Push/Push.cs | 17 +++- build.cake | 2 +- 32 files changed, 426 insertions(+), 292 deletions(-) create mode 100644 SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Consumer.cs diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/MainActivity.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/MainActivity.cs index fcb31fae0..c5d085e36 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/MainActivity.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/MainActivity.cs @@ -5,7 +5,6 @@ using Com.Microsoft.Azure.Mobile.Analytics.Channel; using Com.Microsoft.Azure.Mobile.Ingestion.Models; using Microsoft.Azure.Mobile; -using Microsoft.Azure.Mobile.Push; namespace Contoso.Forms.Puppet.Droid { @@ -44,5 +43,4 @@ public void OnBeforeSending(ILog log) MobileCenterLog.Debug(App.LogTag, "Analytics listener OnBeforeSendingEventLog"); } } - } diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs index 9180d3a32..0f8e41f2e 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/App.xaml.cs @@ -51,7 +51,6 @@ protected override void OnStart() Distribute.ReleaseAvailable = OnReleaseAvailable; MobileCenterLog.Assert(LogTag, "MobileCenter.Configured=" + MobileCenter.Configured); - MobileCenterLog.Assert(LogTag, "MobileCenter.InstallId (before configure)=" + MobileCenter.InstallId); MobileCenter.SetLogUrl("https://in-integration.dev.avalanch.es"); Distribute.SetInstallUrl("http://install.asgard-int.trafficmanager.net"); Distribute.SetApiUrl("https://asgard-int.trafficmanager.net/api/v0.1"); @@ -74,8 +73,18 @@ protected override void OnStart() MobileCenter.Start($"uwp={uwpKey};android={androidKey};ios={iosKey}", typeof(Analytics), typeof(Crashes), typeof(Distribute), typeof(Push)); - MobileCenterLog.Info(LogTag, "MobileCenter.InstallId=" + MobileCenter.InstallId); - MobileCenterLog.Info(LogTag, "Crashes.HasCrashedInLastSession=" + Crashes.HasCrashedInLastSession); + MobileCenter.IsEnabledAsync().ContinueWith(enabled => + { + MobileCenterLog.Info(LogTag, "MobileCenter.Enabled=" + enabled.Result); + }); + MobileCenter.GetInstallIdAsync().ContinueWith(installId => + { + MobileCenterLog.Info(LogTag, "MobileCenter.InstallId=" + installId.Result); + }); + Crashes.HasCrashedInLastSessionAsync().ContinueWith(hasCrashed => + { + MobileCenterLog.Info(LogTag, "Crashes.HasCrashedInLastSession=" + hasCrashed.Result); + }); Crashes.GetLastSessionCrashReportAsync().ContinueWith(report => { MobileCenterLog.Info(LogTag, "Crashes.LastSessionCrashReport.Exception=" + report.Result?.Exception); diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml.cs index 1a9d023c3..d2da7271a 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/AnalyticsContentPage.xaml.cs @@ -34,11 +34,11 @@ public AnalyticsContentPage() } } - protected override void OnAppearing() + protected override async void OnAppearing() { base.OnAppearing(); - EnabledSwitchCell.On = Analytics.Enabled; - EnabledSwitchCell.IsEnabled = MobileCenter.Enabled; + EnabledSwitchCell.On = await Analytics.IsEnabledAsync(); + EnabledSwitchCell.IsEnabled = await MobileCenter.IsEnabledAsync(); } async void AddProperty(object sender, EventArgs e) @@ -79,7 +79,7 @@ void TrackEvent(object sender, EventArgs e) void UpdateEnabled(object sender, ToggledEventArgs e) { - Analytics.Enabled = e.Value; + Analytics.SetEnabled(e.Value); } void RefreshPropCount() diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml.cs index 4ecba8458..3fffd02ec 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/CrashesContentPage.xaml.cs @@ -18,11 +18,11 @@ public CrashesContentPage() } } - protected override void OnAppearing() + protected override async void OnAppearing() { base.OnAppearing(); - CrashesEnabledSwitchCell.On = Crashes.Enabled; - CrashesEnabledSwitchCell.IsEnabled = MobileCenter.Enabled; + CrashesEnabledSwitchCell.On = await Crashes.IsEnabledAsync(); + CrashesEnabledSwitchCell.IsEnabled = await MobileCenter.IsEnabledAsync(); } void TestCrash(object sender, EventArgs e) @@ -40,7 +40,7 @@ void DivideByZero(object sender, EventArgs e) void UpdateEnabled(object sender, ToggledEventArgs e) { - Crashes.Enabled = e.Value; + Crashes.SetEnabled(e.Value); } void GenerateTestCrash(object sender, EventArgs e) diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml.cs index f9447c9d0..bbca82234 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/MobileCenterContentPage.xaml.cs @@ -42,12 +42,11 @@ public MobileCenterContentPage() } } - protected override void OnAppearing() + protected override async void OnAppearing() { base.OnAppearing(); LogLevelLabel.Text = LogLevelNames[MobileCenter.LogLevel]; - MobileCenterEnabledSwitchCell.On = MobileCenter.Enabled; - + MobileCenterEnabledSwitchCell.On = await MobileCenter.IsEnabledAsync(); } void LogLevelCellTapped(object sender, EventArgs e) @@ -80,7 +79,7 @@ void WriteLog(object sender, System.EventArgs e) void UpdateEnabled(object sender, ToggledEventArgs e) { - MobileCenter.Enabled = e.Value; + MobileCenter.SetEnabled(e.Value); } void UpdateLogWriteLevelLabel() diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/OthersContentPage.xaml.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/OthersContentPage.xaml.cs index fc1ab941c..0bf89fa67 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/OthersContentPage.xaml.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/ModulePages/OthersContentPage.xaml.cs @@ -27,12 +27,13 @@ public OthersContentPage() } } - protected override void OnAppearing() + protected override async void OnAppearing() { base.OnAppearing(); - DistributeEnabledSwitchCell.On = Distribute.Enabled; - DistributeEnabledSwitchCell.IsEnabled = MobileCenter.Enabled; - PushEnabledSwitchCell.On = Push.Enabled; + DistributeEnabledSwitchCell.On = await Distribute.IsEnabledAsync(); + DistributeEnabledSwitchCell.IsEnabled = await MobileCenter.IsEnabledAsync(); + PushEnabledSwitchCell.On = await Push.IsEnabledAsync(); + PushEnabledSwitchCell.IsEnabled = await MobileCenter.IsEnabledAsync(); if (XamarinDevice.RuntimePlatform == XamarinDevice.Android) { if (!Application.Current.Properties.ContainsKey(FirebaseEnabledKey)) @@ -45,12 +46,12 @@ protected override void OnAppearing() void UpdateDistributeEnabled(object sender, ToggledEventArgs e) { - Distribute.Enabled = e.Value; + Distribute.SetEnabled(e.Value); } void UpdatePushEnabled(object sender, ToggledEventArgs e) { - Push.Enabled = e.Value; + Push.SetEnabled(e.Value); } void UpdateFirebaseAnalyticsEnabled(object sender, ToggledEventArgs e) diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Consumer.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Consumer.cs new file mode 100644 index 000000000..cdcb901e1 --- /dev/null +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Consumer.cs @@ -0,0 +1,27 @@ +using System; +using System.Threading.Tasks; +using Com.Microsoft.Azure.Mobile.Utils.Async; + +namespace Microsoft.Azure.Mobile +{ + public class Consumer : Java.Lang.Object, IMobileCenterConsumer + { + T _result; + + public Task Task { get; } + + public Consumer() + { + Task = new Task(() => _result); + } + + public void Accept(Java.Lang.Object result) + { + if (result != null) + { + _result = (T)Convert.ChangeType(result, typeof(T)); + } + Task.Start(); + } + } +} diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Microsoft.Azure.Mobile.Android.csproj b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Microsoft.Azure.Mobile.Android.csproj index 7e3a83a76..fba1047f2 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Microsoft.Azure.Mobile.Android.csproj +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Microsoft.Azure.Mobile.Android.csproj @@ -55,6 +55,7 @@ + diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/MobileCenter.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/MobileCenter.cs index 0beba753f..fc7bfe168 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/MobileCenter.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/MobileCenter.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; using Android.App; using Com.Microsoft.Azure.Mobile; using Java.Lang; @@ -8,24 +7,21 @@ namespace Microsoft.Azure.Mobile { using System.Reflection; + using System.Threading.Tasks; + using Com.Microsoft.Azure.Mobile.Utils.Async; + using Java.Util; using AndroidWrapperSdk = Com.Microsoft.Azure.Mobile.Ingestion.Models.WrapperSdk; - /// - /// SDK core used to initialize, start and control specific service. - /// public partial class MobileCenter { /* The key identifier for parsing app secrets */ - private const string PlatformIdentifier = "android"; + const string PlatformIdentifier = "android"; internal MobileCenter() { } - /// - /// This property controls the amount of logs emitted by the SDK. - /// - public static LogLevel LogLevel + static LogLevel PlatformLogLevel { get { @@ -84,19 +80,12 @@ public static LogLevel LogLevel } } - /// - /// Change the base URL (scheme + authority + port only) used to communicate with the backend. - /// - /// Base URL to use for server communication. - public static void SetLogUrl(string logUrl) + static void PlatformSetLogUrl(string logUrl) { AndroidMobileCenter.SetLogUrl(logUrl); } - /// - /// Check whether SDK has already been configured or not. - /// - public static bool Configured + static bool PlatformConfigured { get { @@ -104,33 +93,17 @@ public static bool Configured } } - /// - /// Configure the SDK. - /// This may be called only once per application process lifetime. - /// - /// A unique and secret key used to identify the application. - public static void Configure(string appSecret) + static void PlatformConfigure(string appSecret) { AndroidMobileCenter.Configure(SetWrapperSdkAndGetApplication(), appSecret); } - /// - /// Start services. - /// This may be called only once per service per application process lifetime. - /// - /// List of services to use. - public static void Start(params Type[] services) + static void PlatformStart(params Type[] services) { AndroidMobileCenter.Start(GetServices(services)); } - /// - /// Initialize the SDK with the list of services to start. - /// This may be called only once per application process lifetime. - /// - /// A unique and secret key used to identify the application. - /// List of services to use. - public static void Start(string appSecret, params Type[] services) + static void PlatformStart(string appSecret, params Type[] services) { string parsedSecret; try @@ -145,36 +118,28 @@ public static void Start(string appSecret, params Type[] services) AndroidMobileCenter.Start(SetWrapperSdkAndGetApplication(), parsedSecret, GetServices(services)); } + static Task PlatformIsEnabledAsync() + { + var consumer = new Consumer(); + AndroidMobileCenter.IsEnabled().ThenAccept(consumer); + return consumer.Task; + } - /// - /// Enable or disable the SDK as a whole. Updating the property propagates the value to all services that have been started. - /// - /// - /// The default state is true and updating the state is persisted into local application storage. - /// - public static bool Enabled + static void PlatformSetEnabled(bool enabled) { - get { return AndroidMobileCenter.Enabled; } - set { AndroidMobileCenter.Enabled = value; } + AndroidMobileCenter.SetEnabled(enabled); } - /// - /// Get the unique installation identifier for this application installation on this device. - /// - /// - /// The identifier is lost if clearing application data or uninstalling application. - /// - public static Guid? InstallId + static async Task PlatformGetInstallIdAsync() { - get + var consumer = new Consumer(); + AndroidMobileCenter.InstallId.ThenAccept(consumer); + var installId = await consumer.Task.ConfigureAwait(false); + if (installId != null) { - var installId = AndroidMobileCenter.InstallId; - if (installId != null) - { - return Guid.Parse(installId.ToString()); - } - return null; + return Guid.Parse(installId.ToString()); } + return null; } static Application SetWrapperSdkAndGetApplication() @@ -198,7 +163,7 @@ static Application SetWrapperSdkAndGetApplication() return (Application)Application.Context; } - private static Class[] GetServices(IEnumerable services) + static Class[] GetServices(IEnumerable services) { var classes = new List(); foreach (var t in services) diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/MobileCenter.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/MobileCenter.cs index bfb63346a..89d47e47e 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/MobileCenter.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/MobileCenter.cs @@ -1,7 +1,11 @@ using System; +using System.Threading.Tasks; namespace Microsoft.Azure.Mobile { + /// + /// SDK core used to initialize, start and control specific service. + /// public partial class MobileCenter { // Gets the first instance of an app secret corresponding to the given platform name, or returns the string @@ -50,5 +54,95 @@ internal static string GetSecretForPlatform(string secrets, string platformIdent return platformSecret; } + + /// + /// This property controls the amount of logs emitted by the SDK. + /// + public static LogLevel LogLevel + { + get + { + return PlatformLogLevel; + } + + set + { + PlatformLogLevel = value; + } + } + + /// + /// Check whether the SDK is enabled or not as a whole. + /// + /// A task with result being true if enabled, false if disabled. + public static Task IsEnabledAsync() + { + return PlatformIsEnabledAsync(); + } + + /// + /// Enable or disable the SDK as a whole. + /// Updating the state propagates the value to all services that have been started. + /// + public static void SetEnabled(bool enabled) + { + PlatformSetEnabled(enabled); + } + + /// + /// Get the unique installation identifier for this application installation on this device. + /// + /// + /// The identifier is lost if clearing application data or uninstalling application. + /// + public static Task GetInstallIdAsync() + { + return PlatformGetInstallIdAsync(); + } + + /// + /// Change the base URL (scheme + authority + port only) used to communicate with the backend. + /// + /// Base URL to use for server communication. + public static void SetLogUrl(string logUrl) + { + PlatformSetLogUrl(logUrl); + } + + /// + /// Check whether SDK has already been configured or not. + /// + public static bool Configured => PlatformConfigured; + + /// + /// Configure the SDK. + /// This may be called only once per application process lifetime. + /// + /// A unique and secret key used to identify the application. + public static void Configure(string appSecret) + { + PlatformConfigure(appSecret); + } + + /// + /// Start services. + /// This may be called only once per service per application process lifetime. + /// + /// List of services to use. + public static void Start(params Type[] services) + { + PlatformStart(services); + } + + /// + /// Initialize the SDK with the list of services to start. + /// This may be called only once per application process lifetime. + /// + /// A unique and secret key used to identify the application. + /// List of services to use. + public static void Start(string appSecret, params Type[] services) + { + PlatformStart(appSecret, services); + } } } diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/MobileCenter.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/MobileCenter.cs index e545b2642..f87b97e78 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/MobileCenter.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/MobileCenter.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Threading.Tasks; using ObjCRuntime; namespace Microsoft.Azure.Mobile @@ -8,9 +9,6 @@ namespace Microsoft.Azure.Mobile using iOSLogLevel = Microsoft.Azure.Mobile.iOS.Bindings.MSLogLevel; using iOSWrapperSdk = Microsoft.Azure.Mobile.iOS.Bindings.MSWrapperSdk; - /// - /// SDK core used to initialize, start and control specific service. - /// public partial class MobileCenter { /* The key identifier for parsing app secrets */ @@ -20,10 +18,7 @@ internal MobileCenter() { } - /// - /// This property controls the amount of logs emitted by the SDK. - /// - public static LogLevel LogLevel + static LogLevel PlatformLogLevel { get { @@ -81,19 +76,12 @@ public static LogLevel LogLevel } } - /// - /// Change the base URL (scheme + authority + port only) used to communicate with the backend. - /// - /// Base URL to use for server communication. - public static void SetLogUrl(string logUrl) + static void PlatformSetLogUrl(string logUrl) { iOSMobileCenter.SetLogUrl(logUrl); } - /// - /// Check whether SDK has already been configured or not. - /// - public static bool Configured + static bool PlatformConfigured { get { @@ -101,23 +89,13 @@ public static bool Configured } } - /// - /// Configure the SDK. - /// This may be called only once per application process lifetime. - /// - /// A unique and secret key used to identify the application. - public static void Configure(string appSecret) + static void PlatformConfigure(string appSecret) { SetWrapperSdk(); iOSMobileCenter.ConfigureWithAppSecret(appSecret); } - /// - /// Start services. - /// This may be called only once per service per application process lifetime. - /// - /// List of services to use. - public static void Start(params Type[] services) + static void PlatformStart(params Type[] services) { SetWrapperSdk(); foreach (var service in GetServices(services)) @@ -126,13 +104,7 @@ public static void Start(params Type[] services) } } - /// - /// Initialize the SDK with the list of services to start. - /// This may be called only once per application process lifetime. - /// - /// A unique and secret key used to identify the application. - /// List of services to use. - public static void Start(string appSecret, params Type[] services) + static void PlatformStart(string appSecret, params Type[] services) { SetWrapperSdk(); string parsedSecret; @@ -148,25 +120,21 @@ public static void Start(string appSecret, params Type[] services) iOSMobileCenter.Start(parsedSecret, GetServices(services)); } - /// - /// Enable or disable the SDK as a whole. Updating the property propagates the value to all services that have been started. - /// - /// - /// The default state is true and updating the state is persisted into local application storage. - /// - public static bool Enabled + static Task PlatformIsEnabledAsync() { - get { return iOSMobileCenter.IsEnabled(); } - set { iOSMobileCenter.SetEnabled(value); } + return Task.FromResult(iOSMobileCenter.IsEnabled()); } - /// - /// Get the unique installation identifier for this application installation on this device. - /// - /// - /// The identifier is lost if clearing application data or uninstalling application. - /// - public static Guid? InstallId => Guid.Parse(iOSMobileCenter.InstallId().AsString()); + static void PlatformSetEnabled(bool enabled) + { + iOSMobileCenter.SetEnabled(enabled); + } + + static Task PlatformGetInstallIdAsync() + { + Guid? installId = Guid.Parse(iOSMobileCenter.InstallId().AsString()); + return Task.FromResult(installId); + } private static Class[] GetServices(IEnumerable services) { diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile/MobileCenter.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile/MobileCenter.cs index c63e2f35f..d0e7588aa 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile/MobileCenter.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile/MobileCenter.cs @@ -2,12 +2,10 @@ using System; using System.Diagnostics; +using System.Threading.Tasks; namespace Microsoft.Azure.Mobile { - /// - /// SDK core used to initialize, start and control specific service. - /// public partial class MobileCenter { internal MobileCenter() @@ -15,70 +13,42 @@ internal MobileCenter() } /* Error message to display for unsupported targets. */ - private const string ErrorMessage = + const string ErrorMessage = "[MobileCenter] ASSERT: Cannot use Mobile Center on this target. If you are on Android or iOS or UWP, you must add the NuGet packages in the Android and iOS and UWP projects as well. Other targets are not yet supported."; - /// - /// This property controls the amount of logs emitted by the SDK. - /// - public static LogLevel LogLevel { get; set; } - /// - /// Enable or disable the SDK as a whole. Updating the property propagates the value to all services that have been - /// started. - /// - /// - /// The default state is true and updating the state is persisted into local application storage. - /// - public static bool Enabled { get; set; } + static LogLevel PlatformLogLevel { get; set; } - /// - /// Get the unique installation identifier for this application installation on this device. - /// - /// - /// The identifier is lost if clearing application data or uninstalling application. - /// - public static Guid? InstallId { get; } + static Task PlatformIsEnabledAsync() + { + return Task.FromResult(false); + } + + static void PlatformSetEnabled(bool enabled) + { + } + + static Task PlatformGetInstallIdAsync() + { + return Task.FromResult((Guid?)null); + } - /// - /// Change the base URL (scheme + authority + port only) used to communicate with the backend. - /// - /// Base URL to use for server communication. - public static void SetLogUrl(string logUrl) + static void PlatformSetLogUrl(string logUrl) { } - /// - /// Check whether SDK has already been configured or not. - /// - public static bool Configured { get; } + static bool PlatformConfigured { get; } - /// - /// Configure the SDK. - /// This may be called only once per application process lifetime. - /// - /// A unique and secret key used to identify the application. - public static void Configure(string appSecret) + static void PlatformConfigure(string appSecret) { Debug.WriteLine(ErrorMessage); } - /// - /// Start services. - /// This may be called only once per service per application process lifetime. - /// - /// List of services to use. - public static void Start(params Type[] services) + static void PlatformStart(params Type[] services) { Debug.WriteLine(ErrorMessage); } - /// - /// Initialize the SDK with the list of services to start. - /// This may be called only once per application process lifetime. - /// - /// A unique and secret key used to identify the application. - /// List of services to use. - public static void Start(string appSecret, params Type[] services) + static void PlatformStart(string appSecret, params Type[] services) { Debug.WriteLine(ErrorMessage); } diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android/Analytics.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android/Analytics.cs index 9072c6eee..642810898 100644 --- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android/Analytics.cs +++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android/Analytics.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Threading.Tasks; using Android.Runtime; using Com.Microsoft.Azure.Mobile.Analytics; @@ -24,12 +25,22 @@ internal Analytics() public static Type BindingType => typeof(AndroidAnalytics); /// - /// Enable or disable Analytics module. + /// Check whether the Analytics service is enabled or not. /// - public static bool Enabled + /// A task with result being true if enabled, false if disabled. + public static Task IsEnabledAsync() { - get { return AndroidAnalytics.Enabled; } - set { AndroidAnalytics.Enabled = value; } + var consumer = new Consumer(); + AndroidAnalytics.IsEnabled().ThenAccept(consumer); + return consumer.Task; + } + + /// + /// Enable or disable the Analytics service. + /// + public static void SetEnabled(bool enabled) + { + AndroidAnalytics.SetEnabled(enabled); } ///// diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Analytics.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Analytics.cs index 60ffa1c8f..3fe8abdf4 100644 --- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Analytics.cs +++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Analytics.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Mobile.Analytics { using System.Linq; + using System.Threading.Tasks; using iOSAnalytics = iOS.Bindings.MSAnalytics; /// @@ -27,12 +28,20 @@ internal Analytics() public static Type BindingType => typeof(iOSAnalytics); /// - /// Enable or disable Analytics module. + /// Check whether the Analytics service is enabled or not. /// - public static bool Enabled + /// A task with result being true if enabled, false if disabled. + public static Task IsEnabledAsync() { - get { return iOSAnalytics.IsEnabled(); } - set { iOSAnalytics.SetEnabled(value); } + return Task.FromResult(iOSAnalytics.IsEnabled()); + } + + /// + /// Enable or disable the Analytics service. + /// + public static void SetEnabled(bool enabled) + { + iOSAnalytics.SetEnabled(enabled); } /// diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics/Analytics.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics/Analytics.cs index 24a2d69ec..bf523f4ad 100644 --- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics/Analytics.cs +++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics/Analytics.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Threading.Tasks; namespace Microsoft.Azure.Mobile.Analytics { @@ -12,9 +13,20 @@ internal Analytics() } /// - /// Enable or disable Analytics module. + /// Check whether the Analytics service is enabled or not. /// - public static bool Enabled { get; set; } + /// A task with result being true if enabled, false if disabled. + public static Task IsEnabledAsync() + { + return Task.FromResult(false); + } + + /// + /// Enable or disable the Analytics service. + /// + public static void SetEnabled(bool enabled) + { + } ///// ///// Enable or disable automatic page tracking. diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/PlatformCrashes.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/PlatformCrashes.cs index f4f3ff1d4..6413f31e3 100644 --- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/PlatformCrashes.cs +++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/PlatformCrashes.cs @@ -4,17 +4,16 @@ using System.Linq; using System.Threading.Tasks; using Android.Runtime; -using Com.Microsoft.Azure.Mobile; using Com.Microsoft.Azure.Mobile.Crashes.Model; namespace Microsoft.Azure.Mobile.Crashes { - using ModelException = Com.Microsoft.Azure.Mobile.Crashes.Ingestion.Models.Exception; - using ModelStackFrame = Com.Microsoft.Azure.Mobile.Crashes.Ingestion.Models.StackFrame; - using AndroidManagedErrorLog = Com.Microsoft.Azure.Mobile.Crashes.Ingestion.Models.ManagedErrorLog; using AndroidCrashes = Com.Microsoft.Azure.Mobile.Crashes.AndroidCrashes; - using AndroidICrashListener = Com.Microsoft.Azure.Mobile.Crashes.ICrashesListener; using AndroidExceptionDataManager = Com.Microsoft.Azure.Mobile.Crashes.WrapperSdkExceptionManager; + using AndroidICrashListener = Com.Microsoft.Azure.Mobile.Crashes.ICrashesListener; + using AndroidManagedErrorLog = Com.Microsoft.Azure.Mobile.Crashes.Ingestion.Models.ManagedErrorLog; + using ModelException = Com.Microsoft.Azure.Mobile.Crashes.Ingestion.Models.Exception; + using ModelStackFrame = Com.Microsoft.Azure.Mobile.Crashes.Ingestion.Models.StackFrame; class PlatformCrashes : PlatformCrashesBase { @@ -50,42 +49,35 @@ public override void NotifyUserConfirmation(UserConfirmation confirmation) public override Type BindingType => typeof(AndroidCrashes); - public override bool Enabled + public override Task IsEnabledAsync() { - get { return AndroidCrashes.Enabled; } - set { AndroidCrashes.Enabled = value; } + var consumer = new Consumer(); + AndroidCrashes.IsEnabled().ThenAccept(consumer); + return consumer.Task; } - public override bool HasCrashedInLastSession => AndroidCrashes.HasCrashedInLastSession; + public override void SetEnabled(bool enabled) + { + AndroidCrashes.SetEnabled(enabled); + } + + public override Task HasCrashedInLastSessionAsync() + { + var consumer = new Consumer(); + AndroidCrashes.HasCrashedInLastSession().ThenAccept(consumer); + return consumer.Task; + } public override async Task GetLastSessionCrashReportAsync() { - var callback = new GetLastSessionCrashReportCallback(); - AndroidCrashes.GetLastSessionCrashReport(callback); - var androidErrorReport = await callback.Result.ConfigureAwait(false); + var consumer = new Consumer(); + AndroidCrashes.LastSessionCrashReport.ThenAccept(consumer); + var androidErrorReport = await consumer.Task.ConfigureAwait(false); if (androidErrorReport == null) return null; return ErrorReportCache.GetErrorReport(androidErrorReport); } - class GetLastSessionCrashReportCallback : Java.Lang.Object, IResultCallback - { - AndroidErrorReport _result; - - internal Task Result { get; } - - internal GetLastSessionCrashReportCallback() - { - Result = new Task(() => _result); - } - - public void OnResult(Java.Lang.Object result) - { - _result = result as AndroidErrorReport; - Result.Start(); - } - } - //public override void TrackException(Exception exception) //{ // AndroidCrashes.Instance.TrackException(GenerateModelException(exception)); diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Shared/Crashes.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Shared/Crashes.cs index 9e10be1c8..44e445af5 100644 --- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Shared/Crashes.cs +++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Shared/Crashes.cs @@ -22,7 +22,7 @@ static Crashes() SentErrorReport?.Invoke(sender, e); }; - PlatformCrashes.FailedToSendErrorReport += (sender, e) => + PlatformCrashes.FailedToSendErrorReport += (sender, e) => { FailedToSendErrorReport?.Invoke(sender, e); }; @@ -155,22 +155,33 @@ public static void NotifyUserConfirmation(UserConfirmation confirmation) public static Type BindingType => PlatformCrashes.BindingType; #if WINDOWS_UWP - [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This does not exist in UWP and should not be used.")] #else /// - /// Enables or disables Crashes module. + /// Check whether the Crashes service is enabled or not. /// + /// A task with result being true if enabled, false if disabled. #endif - public static bool Enabled + public static Task IsEnabledAsync() { - get { return PlatformCrashes.Enabled; } - set { PlatformCrashes.Enabled = value; } + return PlatformCrashes.IsEnabledAsync(); } #if WINDOWS_UWP + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This does not exist in UWP and should not be used.")] +#else + /// + /// Enable or disable the Crashes service. + /// +#endif + public static void SetEnabled(bool enabled) + { + PlatformCrashes.SetEnabled(enabled); + } +#if WINDOWS_UWP [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This does not exist in UWP and should not be used.")] #else @@ -178,10 +189,10 @@ public static bool Enabled /// Provides information whether the app crashed in its last session. /// /// - /// true if a crash was recorded in the last session, otherwise false. + /// Task with result being true if a crash was recorded in the last session, otherwise false. /// #endif - public static bool HasCrashedInLastSession => PlatformCrashes.HasCrashedInLastSession; + public static Task HasCrashedInLastSessionAsync() => PlatformCrashes.HasCrashedInLastSessionAsync(); #if WINDOWS_UWP [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Shared/IPlatformCrashes.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Shared/IPlatformCrashes.cs index 015e3f8c9..21ff8b462 100644 --- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Shared/IPlatformCrashes.cs +++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Shared/IPlatformCrashes.cs @@ -6,13 +6,15 @@ namespace Microsoft.Azure.Mobile.Crashes /// /// Interface to abstract features between different platforms. /// - internal interface IPlatformCrashes + interface IPlatformCrashes { Type BindingType { get; } - bool Enabled { get; set; } + Task IsEnabledAsync(); - bool HasCrashedInLastSession { get; } + void SetEnabled(bool enabled); + + Task HasCrashedInLastSessionAsync(); Task GetLastSessionCrashReportAsync(); diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Shared/PlatformCrashesBase.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Shared/PlatformCrashesBase.cs index 46a60c811..0ae135008 100644 --- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Shared/PlatformCrashesBase.cs +++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Shared/PlatformCrashesBase.cs @@ -10,9 +10,11 @@ abstract class PlatformCrashesBase : IPlatformCrashes { public abstract Type BindingType { get; } - public abstract bool Enabled { get; set; } + public abstract Task IsEnabledAsync(); - public abstract bool HasCrashedInLastSession { get; } + public abstract void SetEnabled(bool enabled); + + public abstract Task HasCrashedInLastSessionAsync(); public abstract Task GetLastSessionCrashReportAsync(); diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/PlatformCrashes.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/PlatformCrashes.cs index 43dba79d5..880408611 100644 --- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/PlatformCrashes.cs +++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/PlatformCrashes.cs @@ -22,13 +22,20 @@ class PlatformCrashes : PlatformCrashesBase public override Type BindingType => typeof(MSCrashes); - public override bool Enabled + public override Task IsEnabledAsync() { - get { return MSCrashes.IsEnabled(); } - set { MSCrashes.SetEnabled(value); } + return Task.FromResult(MSCrashes.IsEnabled()); } - public override bool HasCrashedInLastSession => MSCrashes.HasCrashedInLastSession; + public override void SetEnabled(bool enabled) + { + MSCrashes.SetEnabled(enabled); + } + + public override Task HasCrashedInLastSessionAsync() + { + return Task.FromResult(MSCrashes.HasCrashedInLastSession); + } public override Task GetLastSessionCrashReportAsync() { diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes/PlatformCrashes.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes/PlatformCrashes.cs index e2b591f5d..8da2991c1 100644 --- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes/PlatformCrashes.cs +++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes/PlatformCrashes.cs @@ -20,9 +20,19 @@ internal class PlatformCrashes : PlatformCrashesBase public override Type BindingType { get; } - public override bool Enabled { get; set; } + public override Task IsEnabledAsync() + { + return Task.FromResult(false); + } - public override bool HasCrashedInLastSession { get; } + public override void SetEnabled(bool enabled) + { + } + + public override Task HasCrashedInLastSessionAsync() + { + return Task.FromResult(false); + } public override Task GetLastSessionCrashReportAsync() { diff --git a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android/Distribute.cs b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android/Distribute.cs index b1c643ff3..7d398f087 100644 --- a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android/Distribute.cs +++ b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android/Distribute.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; using Android.App; using Android.Runtime; using Com.Microsoft.Azure.Mobile.Distribute; @@ -10,17 +11,16 @@ public static partial class Distribute [Preserve] public static Type BindingType => typeof(AndroidDistribute); - static bool PlatformEnabled + static Task PlatformIsEnabledAsync() { - get - { - return AndroidDistribute.Enabled; - } + var consumer = new Consumer(); + AndroidDistribute.IsEnabled().ThenAccept(consumer); + return consumer.Task; + } - set - { - AndroidDistribute.Enabled = value; - } + static void PlatformSetEnabled(bool enabled) + { + AndroidDistribute.SetEnabled(enabled); } static void PlatformSetInstallUrl(string installUrl) diff --git a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android/Microsoft.Azure.Mobile.Distribute.Android.csproj b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android/Microsoft.Azure.Mobile.Distribute.Android.csproj index df1dcdd5e..246c0c61b 100644 --- a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android/Microsoft.Azure.Mobile.Distribute.Android.csproj +++ b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android/Microsoft.Azure.Mobile.Distribute.Android.csproj @@ -63,6 +63,10 @@ {11D31A79-0F09-4708-8097-3D1C5D886547} Microsoft.Azure.Mobile.Distribute.Android.Bindings + + {119C1730-E109-4BC9-AA89-9DCA2C50BFD5} + Microsoft.Azure.Mobile.Android + diff --git a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Shared/Distribute.cs b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Shared/Distribute.cs index 90071577c..847c614fd 100644 --- a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Shared/Distribute.cs +++ b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Shared/Distribute.cs @@ -1,4 +1,4 @@ -using System; +using System.Threading.Tasks; namespace Microsoft.Azure.Mobile.Distribute { @@ -8,19 +8,20 @@ namespace Microsoft.Azure.Mobile.Distribute public static partial class Distribute { /// - /// Enable or disable Distribute module. + /// Check whether the Distribute service is enabled or not. /// - public static bool Enabled + /// A task with result being true if enabled, false if disabled. + public static Task IsEnabledAsync() { - get - { - return PlatformEnabled; - } + return PlatformIsEnabledAsync(); + } - set - { - PlatformEnabled = value; - } + /// + /// Enable or disable the Distribute service. + /// + public static void SetEnabled(bool enabled) + { + PlatformSetEnabled(enabled); } /// diff --git a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.iOS/Distribute.cs b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.iOS/Distribute.cs index 01bc01c60..3af683ec4 100644 --- a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.iOS/Distribute.cs +++ b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.iOS/Distribute.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; using Foundation; using Microsoft.Azure.Mobile.Distribute.iOS.Bindings; @@ -17,17 +18,14 @@ public static Type BindingType } } - static bool PlatformEnabled + static Task PlatformIsEnabledAsync() { - get - { - return MSDistribute.IsEnabled(); - } + return Task.FromResult(MSDistribute.IsEnabled()); + } - set - { - MSDistribute.SetEnabled(value); - } + static void PlatformSetEnabled(bool enabled) + { + MSDistribute.SetEnabled(enabled); } static void PlatformSetInstallUrl(string installUrl) diff --git a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute/Distribute.cs b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute/Distribute.cs index baaf8d153..cf155c39d 100644 --- a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute/Distribute.cs +++ b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute/Distribute.cs @@ -1,8 +1,17 @@ -namespace Microsoft.Azure.Mobile.Distribute +using System.Threading.Tasks; + +namespace Microsoft.Azure.Mobile.Distribute { public static partial class Distribute { - static bool PlatformEnabled { get; set; } + static Task PlatformIsEnabledAsync() + { + return Task.FromResult(false); + } + + static void PlatformSetEnabled(bool enabled) + { + } static void PlatformSetInstallUrl(string installUrl) { diff --git a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android/Microsoft.Azure.Mobile.Push.Android.csproj b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android/Microsoft.Azure.Mobile.Push.Android.csproj index 20fc681ee..f599720e7 100644 --- a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android/Microsoft.Azure.Mobile.Push.Android.csproj +++ b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android/Microsoft.Azure.Mobile.Push.Android.csproj @@ -62,6 +62,10 @@ {C3B5BA33-DA39-400D-B5B3-85C68354FD74} Microsoft.Azure.Mobile.Android.Bindings + + {119C1730-E109-4BC9-AA89-9DCA2C50BFD5} + Microsoft.Azure.Mobile.Android + diff --git a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android/Push.cs b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android/Push.cs index aec09d582..e7dcb812d 100644 --- a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android/Push.cs +++ b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android/Push.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; using Android.Runtime; using Com.Microsoft.Azure.Mobile.Push; @@ -23,10 +24,16 @@ static Push() AndroidPush.SetListener(_pushListener); } - private static bool PlatformEnabled + static Task PlatformIsEnabledAsync() { - get { return AndroidPush.Enabled; } - set { AndroidPush.Enabled = value; } + var consumer = new Consumer(); + AndroidPush.IsEnabled().ThenAccept(consumer); + return consumer.Task; + } + + static void PlatformSetEnabled(bool enabled) + { + AndroidPush.SetEnabled(enabled); } /// diff --git a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Shared/Push.cs b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Shared/Push.cs index 7f64f8d4c..42f330c2b 100644 --- a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Shared/Push.cs +++ b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Shared/Push.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; namespace Microsoft.Azure.Mobile.Push { @@ -8,12 +9,20 @@ namespace Microsoft.Azure.Mobile.Push public partial class Push { /// - /// Enable or disable Push module. + /// Check whether the Push service is enabled or not. /// - public static bool Enabled + /// A task with result being true if enabled, false if disabled. + public static Task IsEnabledAsync() { - get { return PlatformEnabled; } - set { PlatformEnabled = value; } + return PlatformIsEnabledAsync(); + } + + /// + /// Enable or disable the Push service. + /// + public static void SetEnabled(bool enabled) + { + PlatformSetEnabled(enabled); } /// diff --git a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.iOS/Push.cs b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.iOS/Push.cs index 9243464b9..84b001ba4 100644 --- a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.iOS/Push.cs +++ b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.iOS/Push.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Threading.Tasks; using Foundation; using Microsoft.Azure.Mobile.Push.iOS; using Microsoft.Azure.Mobile.Push.iOS.Bindings; @@ -26,16 +27,20 @@ static Push() MSPush.SetDelegate(_pushDelegate); } - private static bool PlatformEnabled + static Task PlatformIsEnabledAsync() { - get { return MSPush.IsEnabled(); } - set { MSPush.SetEnabled(value); } + return Task.FromResult(MSPush.IsEnabled()); + } + + static void PlatformSetEnabled(bool enabled) + { + MSPush.SetEnabled(enabled); } [Preserve] public static Type BindingType { - get + get { return _internalBindingType; } diff --git a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push/Push.cs b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push/Push.cs index 5ac524538..d63c84c52 100644 --- a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push/Push.cs +++ b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push/Push.cs @@ -1,7 +1,16 @@ -namespace Microsoft.Azure.Mobile.Push +using System.Threading.Tasks; + +namespace Microsoft.Azure.Mobile.Push { - public partial class Push - { - static bool PlatformEnabled { get; set; } + public partial class Push + { + static Task PlatformIsEnabledAsync() + { + return Task.FromResult(false); + } + + static void PlatformSetEnabled(bool enabled) + { + } } } diff --git a/build.cake b/build.cake index a31b42717..d632095dc 100644 --- a/build.cake +++ b/build.cake @@ -53,7 +53,7 @@ var ANDROID_ASSEMBLIES_FOLDER = TEMPORARY_PREFIX + "AndroidAssemblies"; var PCL_ASSEMBLIES_FOLDER = TEMPORARY_PREFIX + "PCLAssemblies"; // Native SDK versions -var ANDROID_SDK_VERSION = "0.9.0"; +var ANDROID_SDK_VERSION = "0.10.0-4+cf99700"; var IOS_SDK_VERSION = "0.9.0"; var PLATFORM_PATHS = new PlatformPaths(); From 622213ddc9d7995ca000485ad66831fddb269768 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Fri, 16 Jun 2017 14:17:07 -0700 Subject: [PATCH 02/60] Fix windows code for async signature changes --- .../Channel/Channel.cs | 3 +- .../MobileCenter.cs | 81 ++++++------------- .../MobileCenterService.cs | 4 +- .../Analytics.cs | 27 ++++--- .../PlatformCrashes.cs | 14 +++- .../Push.cs | 26 +++--- .../AnalyticsTest.cs | 20 ++--- .../PushTest.cs | 8 +- .../MobileCenterServiceTest.cs | 12 +-- .../MobileCenterTest.cs | 14 ++-- 10 files changed, 92 insertions(+), 117 deletions(-) diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs index 085b70550..b264bdfaf 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs @@ -348,7 +348,8 @@ private async Task TriggerIngestionAsync(State state, IList logs, string ba } // If the optional Install ID has no value, default to using empty GUID - var installId = MobileCenter.InstallId.HasValue ? MobileCenter.InstallId.Value : Guid.Empty; + var rawInstallId = await MobileCenter.GetInstallIdAsync(); + var installId = rawInstallId.HasValue ? rawInstallId.Value : Guid.Empty; using (var serviceCall = _ingestion.PrepareServiceCall(_appSecret, installId, logs)) { try diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenter.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenter.cs index 81cd932a4..5fca3574d 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenter.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenter.cs @@ -5,6 +5,7 @@ using Microsoft.Azure.Mobile.Ingestion.Models; using Microsoft.Azure.Mobile.Utils; using Microsoft.Azure.Mobile.Ingestion.Models.Serialization; +using System.Threading.Tasks; namespace Microsoft.Azure.Mobile { @@ -32,7 +33,7 @@ public partial class MobileCenter private string _logUrl; private bool _instanceConfigured; private string _appSecret; - + #region static // The shared instance of MobileCenter @@ -60,10 +61,7 @@ internal static MobileCenter Instance } } - /// - /// Controls the amount of logs emitted by the SDK. - /// - public static LogLevel LogLevel + static LogLevel PlatformLogLevel { get { @@ -81,44 +79,30 @@ public static LogLevel LogLevel } } - /// - /// Enable or disable the SDK as a whole. Updating the property propagates the value to all services that have been - /// started. - /// - /// - /// The default state is true and updating the state is persisted into local application storage. - /// - public static bool Enabled + static Task PlatformIsEnabledAsync() { - get + // This is not really async for now, signature was introduced for Android + // It's fine for callers of the current implementation to use Wait(). + lock (MobileCenterLock) { - lock (MobileCenterLock) - { - return Instance.InstanceEnabled; - } + return Task.FromResult(Instance.InstanceEnabled); } - set + } + + static void PlatformSetEnabled(bool enabled) + { + lock (MobileCenterLock) { - lock (MobileCenterLock) - { - Instance.InstanceEnabled = value; - } + Instance.InstanceEnabled = enabled; } } - /// - /// Get the unique installation identifier for this application installation on this device. - /// - /// - /// The identifier is lost if clearing application data or uninstalling application. - /// - public static Guid? InstallId => Instance._applicationSettings.GetValue(InstallIdKey, Guid.NewGuid()); + static Task PlatformGetInstallIdAsync() + { + return Task.FromResult((Guid?)Instance._applicationSettings.GetValue(InstallIdKey, Guid.NewGuid())); + } - /// - /// Change the base URL (scheme + authority + port only) used to communicate with the backend. - /// - /// Base URL to use for server communication. - public static void SetLogUrl(string logUrl) + static void PlatformSetLogUrl(string logUrl) { lock (MobileCenterLock) { @@ -139,10 +123,7 @@ internal static void SetCustomProperties(CustomProperties customProperties) } } - /// - /// Check whether SDK has already been configured or not. - /// - public static bool Configured + static bool PlatformConfigured { get { @@ -153,12 +134,7 @@ public static bool Configured } } - /// - /// Configure the SDK. - /// This may be called only once per application process lifetime. - /// - /// A unique and secret key used to identify the application. - public static void Configure(string appSecret) + static void PlatformConfigure(string appSecret) { lock (MobileCenterLock) { @@ -173,12 +149,7 @@ public static void Configure(string appSecret) } } - /// - /// Start services. - /// This may be called only once per service per application process lifetime. - /// - /// List of services to use. - public static void Start(params Type[] services) + static void PlatformStart(params Type[] services) { lock (MobileCenterLock) { @@ -193,13 +164,7 @@ public static void Start(params Type[] services) } } - /// - /// Initialize the SDK with the list of services to start. - /// This may be called only once per application process lifetime. - /// - /// A unique and secret key used to identify the application. - /// List of services to use. - public static void Start(string appSecret, params Type[] services) + static void PlatformStart(string appSecret, params Type[] services) { lock (MobileCenterLock) { diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenterService.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenterService.cs index f7913b9ad..dc4013042 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenterService.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenterService.cs @@ -86,7 +86,7 @@ public virtual bool InstanceEnabled lock (_serviceLock) { var enabledString = value ? "enabled" : "disabled"; - if (value && !MobileCenter.Enabled) + if (value && !MobileCenter.IsEnabledAsync().Result) { MobileCenterLog.Error(LogTag, "The SDK is disabled. Set MobileCenter.Enabled to 'true' before enabling a specific service."); @@ -116,7 +116,7 @@ public virtual void OnChannelGroupReady(IChannelGroup channelGroup, string appSe { ChannelGroup = channelGroup; Channel = channelGroup.AddChannel(ChannelName, TriggerCount, TriggerInterval, TriggerMaxParallelRequests); - var enabled = MobileCenter.Enabled && InstanceEnabled; + var enabled = MobileCenter.IsEnabledAsync().Result && InstanceEnabled; _applicationSettings[EnabledPreferenceKey] = enabled; Channel.SetEnabledAsync(enabled); } diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Windows.Shared/Analytics.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Windows.Shared/Analytics.cs index d6c8172e4..248fd8298 100644 --- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Windows.Shared/Analytics.cs +++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Windows.Shared/Analytics.cs @@ -5,6 +5,7 @@ using Microsoft.Azure.Mobile.Analytics.Channel; using Microsoft.Azure.Mobile.Ingestion.Models.Serialization; using Microsoft.Azure.Mobile.Utils; +using System.Threading.Tasks; namespace Microsoft.Azure.Mobile.Analytics { @@ -40,23 +41,25 @@ public static Analytics Instance } /// - /// Enable or disable Analytics module. + /// Check whether the Analytics service is enabled or not. /// - public static bool Enabled + /// A task with result being true if enabled, false if disabled. + public static Task IsEnabledAsync() { - get + lock (AnalyticsLock) { - lock (AnalyticsLock) - { - return Instance.InstanceEnabled; - } + return Task.FromResult(Instance.InstanceEnabled); } - set + } + + /// + /// Enable or disable the Analytics service. + /// + public static void SetEnabled(bool enabled) + { + lock (AnalyticsLock) { - lock (AnalyticsLock) - { - Instance.InstanceEnabled = value; - } + Instance.InstanceEnabled = enabled; } } diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.UWP/PlatformCrashes.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.UWP/PlatformCrashes.cs index b67fb63b6..619db8bc4 100644 --- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.UWP/PlatformCrashes.cs +++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.UWP/PlatformCrashes.cs @@ -19,9 +19,19 @@ internal class PlatformCrashes : PlatformCrashesBase public override Type BindingType { get; } - public override bool Enabled { get; set; } + public override Task IsEnabledAsync() + { + return Task.FromResult(false); + } - public override bool HasCrashedInLastSession { get; } + public override void SetEnabled(bool enabled) + { + } + + public override Task HasCrashedInLastSessionAsync() + { + return Task.FromResult(false); + } public override GetErrorAttachmentsCallback GetErrorAttachments { get; set; } diff --git a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Windows.Shared/Push.cs b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Windows.Shared/Push.cs index 5ccdd628b..d3675ed51 100644 --- a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Windows.Shared/Push.cs +++ b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Windows.Shared/Push.cs @@ -2,6 +2,7 @@ using Microsoft.Azure.Mobile.Ingestion.Models.Serialization; using Microsoft.Azure.Mobile.Push.Ingestion.Models; using Microsoft.Azure.Mobile.Utils.Synchronization; +using System.Threading.Tasks; namespace Microsoft.Azure.Mobile.Push { @@ -30,24 +31,19 @@ public static Push Instance } } - /// - /// Push module enabled or disabled - /// - private static bool PlatformEnabled + static Task PlatformIsEnabledAsync() { - get + lock (PushLock) { - lock (PushLock) - { - return Instance.InstanceEnabled; - } + return Task.FromResult(Instance.InstanceEnabled); } - set + } + + static void PlatformSetEnabled(bool enabled) + { + lock (PushLock) { - lock (PushLock) - { - Instance.InstanceEnabled = value; - } + Instance.InstanceEnabled = enabled; } } @@ -76,7 +72,7 @@ public override void OnChannelGroupReady(IChannelGroup channelGroup, string appS using (_mutex.GetLock()) { base.OnChannelGroupReady(channelGroup, appSecret); - ApplyEnabledState(Enabled); + ApplyEnabledState(IsEnabledAsync().Result); } } diff --git a/Tests/Microsoft.Azure.Mobile.Analytics.Test.Windows/AnalyticsTest.cs b/Tests/Microsoft.Azure.Mobile.Analytics.Test.Windows/AnalyticsTest.cs index 307d89a1f..75b4b69de 100644 --- a/Tests/Microsoft.Azure.Mobile.Analytics.Test.Windows/AnalyticsTest.cs +++ b/Tests/Microsoft.Azure.Mobile.Analytics.Test.Windows/AnalyticsTest.cs @@ -49,10 +49,10 @@ public void InstanceIsNotNull() [TestMethod] public void GetEnabled() { - Analytics.Enabled = false; - var valWhenFalse = Analytics.Enabled; - Analytics.Enabled = true; - var valWhenTrue = Analytics.Enabled; + Analytics.SetEnabled(false); + var valWhenFalse = Analytics.IsEnabledAsync().Result; + Analytics.SetEnabled(true); + var valWhenTrue = Analytics.IsEnabledAsync().Result; Assert.IsFalse(valWhenFalse); Assert.IsTrue(valWhenTrue); @@ -120,7 +120,7 @@ public void StartAnalyticsAfterStartWasInvokedAndNotSuspended() [TestMethod] public void SetEnabledFalse() { - Analytics.Enabled = false; + Analytics.SetEnabled(false); Analytics.Instance.OnChannelGroupReady(_mockChannelGroup.Object, string.Empty); _applicationLifecycleHelper.InvokeStarted(); _applicationLifecycleHelper.InvokeSuspended(); @@ -136,9 +136,9 @@ public void SetEnabledFalse() [TestMethod] public void EnableAfterDisabling() { - Analytics.Enabled = false; + Analytics.SetEnabled(false); Analytics.Instance.OnChannelGroupReady(_mockChannelGroup.Object, string.Empty); - Analytics.Enabled = true; + Analytics.SetEnabled(true); _applicationLifecycleHelper.InvokeStarted(); _applicationLifecycleHelper.InvokeSuspended(); @@ -154,7 +154,7 @@ public void EnableAfterDisabling() [TestMethod] public void TrackEvent() { - Analytics.Enabled = true; + Analytics.SetEnabled(true); Analytics.Instance.OnChannelGroupReady(_mockChannelGroup.Object, string.Empty); var eventName = "eventName"; var key = "key"; @@ -175,7 +175,7 @@ public void TrackEvent() [TestMethod] public void TrackEventInvalid() { - Analytics.Enabled = true; + Analytics.SetEnabled(true); Analytics.Instance.OnChannelGroupReady(_mockChannelGroup.Object, string.Empty); // Event name is null or empty @@ -234,7 +234,7 @@ public void TrackEventInvalid() public void TrackEventWhileDisabled() { Analytics.Instance.OnChannelGroupReady(_mockChannelGroup.Object, string.Empty); - Analytics.Enabled = false; + Analytics.SetEnabled(false); Analytics.TrackEvent("anevent"); _mockChannel.Verify(channel => channel.EnqueueAsync(It.IsAny()), Times.Never()); diff --git a/Tests/Microsoft.Azure.Mobile.Push.Test.Windows/PushTest.cs b/Tests/Microsoft.Azure.Mobile.Push.Test.Windows/PushTest.cs index dc16e1c0c..65b7a2e5a 100644 --- a/Tests/Microsoft.Azure.Mobile.Push.Test.Windows/PushTest.cs +++ b/Tests/Microsoft.Azure.Mobile.Push.Test.Windows/PushTest.cs @@ -21,11 +21,11 @@ public void InstanceIsNotNull() [TestMethod] public void GetEnabled() { - Push.Enabled = false; - Assert.IsFalse(Push.Enabled); + Push.SetEnabled(false); + Assert.IsFalse(Push.IsEnabledAsync().Result); - Push.Enabled = true; - Assert.IsTrue(Push.Enabled); + Push.SetEnabled(true); + Assert.IsTrue(Push.IsEnabledAsync().Result); } } } diff --git a/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterServiceTest.cs b/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterServiceTest.cs index a92888961..60a3cfd4e 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterServiceTest.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterServiceTest.cs @@ -50,7 +50,7 @@ public void SetEnabledDifferentValueNoChannel() { _mockSettings.Setup(settings => settings.GetValue(_testService.PublicEnabledPreferenceKey, It.IsAny())) .Returns(true); - MobileCenter.Enabled = true; + MobileCenter.SetEnabled(true); _testService.InstanceEnabled = false; _mockSettings.VerifySet(settings => settings[_testService.PublicEnabledPreferenceKey] = false, Times.Once()); @@ -64,7 +64,7 @@ public void EnableServiceWhenMobileCenterIsDisabled() { _mockSettings.Setup(settings => settings.GetValue(_testService.PublicEnabledPreferenceKey, It.IsAny())) .Returns(true); - MobileCenter.Enabled = false; + MobileCenter.SetEnabled(false); _testService.InstanceEnabled = true; @@ -80,7 +80,7 @@ public void SetEnabledSameValue() _mockSettings.Setup( settings => settings.GetValue(_testService.PublicEnabledPreferenceKey, It.IsAny())) .Returns(true); - MobileCenter.Enabled = true; + MobileCenter.SetEnabled(true); _testService.InstanceEnabled = true; @@ -95,7 +95,7 @@ public void SetEnabledDifferentValue() { _mockSettings.Setup(settings => settings.GetValue(_testService.PublicEnabledPreferenceKey, It.IsAny())) .Returns(true); - MobileCenter.Enabled = true; + MobileCenter.SetEnabled(true); _testService.OnChannelGroupReady(_mockChannelGroup.Object, string.Empty); _testService.InstanceEnabled = false; @@ -110,7 +110,7 @@ public void SetEnabledDifferentValue() [TestMethod] public void OnChannelGroupReady() { - MobileCenter.Enabled = true; + MobileCenter.SetEnabled(true); _mockSettings.Setup(settings => settings.GetValue(_testService.PublicEnabledPreferenceKey, It.IsAny())) .Returns(true); _testService.OnChannelGroupReady(_mockChannelGroup.Object, string.Empty); @@ -130,7 +130,7 @@ public void OnChannelGroupReady() [TestMethod] public void OnChannelGroupReadyMobileCenterIsDisabled() { - MobileCenter.Enabled = false; + MobileCenter.SetEnabled(false); _mockSettings.Setup( settings => settings.GetValue(_testService.PublicEnabledPreferenceKey, It.IsAny())) .Returns(true); diff --git a/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterTest.cs b/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterTest.cs index 2ac110548..7e35c4213 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterTest.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterTest.cs @@ -120,8 +120,8 @@ public void GetEnabled() settingsMock.SetupSequence(settings => settings.GetValue(MobileCenter.EnabledKey, It.IsAny())) .Returns(true).Returns(false); - Assert.IsTrue(MobileCenter.Enabled); - Assert.IsFalse(MobileCenter.Enabled); + Assert.IsTrue(MobileCenter.IsEnabledAsync().Result); + Assert.IsFalse(MobileCenter.IsEnabledAsync().Result); settingsMock.Verify(settings => settings.GetValue(MobileCenter.EnabledKey, It.IsAny()), Times.Exactly(2)); } @@ -139,7 +139,7 @@ public void SetEnabledSameValue() .Returns(new Mock().Object); MobileCenter.Instance = new MobileCenter(settingsMock.Object, new MockChannelGroupFactory(channelGroupMock)); MobileCenter.Start("appsecret", typeof(MockMobileCenterService)); - MobileCenter.Enabled = MobileCenter.Enabled; + MobileCenter.SetEnabled(MobileCenter.IsEnabledAsync().Result); MockMobileCenterService.Instance.MockInstance.VerifySet( service => service.InstanceEnabled = It.IsAny(), Times.Never()); @@ -160,8 +160,8 @@ public void SetEnabledDifferentValueAfterConfigure() .Returns(new Mock().Object); MobileCenter.Instance = new MobileCenter(settingsMock.Object, new MockChannelGroupFactory(channelGroupMock)); MobileCenter.Start("appsecret", typeof(MockMobileCenterService)); - var setVal = !MobileCenter.Enabled; - MobileCenter.Enabled = setVal; + var setVal = !MobileCenter.IsEnabledAsync().Result; + MobileCenter.SetEnabled(setVal); MockMobileCenterService.Instance.MockInstance.VerifySet(service => service.InstanceEnabled = setVal, Times.Once()); @@ -182,7 +182,7 @@ public void SetEnabledDifferentValueBeforeConfigure() group => group.AddChannel(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Returns(new Mock().Object); MobileCenter.Instance = new MobileCenter(settingsMock.Object, new MockChannelGroupFactory(channelGroupMock)); - MobileCenter.Enabled = false; + MobileCenter.SetEnabled(false); MobileCenter.Start("appsecret", typeof(MockMobileCenterService)); settingsMock.VerifySet(settings => settings[MobileCenter.EnabledKey] = false, Times.Once()); @@ -211,7 +211,7 @@ public void GetInstallId() var fakeInstallId = Guid.NewGuid(); settings[MobileCenter.InstallIdKey] = fakeInstallId; MobileCenter.Instance = new MobileCenter(settings); - var installId = MobileCenter.InstallId; + var installId = MobileCenter.GetInstallIdAsync().Result; Assert.IsTrue(installId.HasValue); Assert.AreEqual(installId.Value, fakeInstallId); From 0964cbcfe73bab1556541fa0893eff6ea66a5767 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Fri, 16 Jun 2017 14:22:36 -0700 Subject: [PATCH 03/60] Reformat a file --- .../Consumer.cs | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Consumer.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Consumer.cs index cdcb901e1..6889d6135 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Consumer.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Consumer.cs @@ -4,24 +4,24 @@ namespace Microsoft.Azure.Mobile { - public class Consumer : Java.Lang.Object, IMobileCenterConsumer - { - T _result; + public class Consumer : Java.Lang.Object, IMobileCenterConsumer + { + T _result; - public Task Task { get; } + public Task Task { get; } - public Consumer() - { - Task = new Task(() => _result); - } + public Consumer() + { + Task = new Task(() => _result); + } - public void Accept(Java.Lang.Object result) - { - if (result != null) - { - _result = (T)Convert.ChangeType(result, typeof(T)); - } - Task.Start(); - } - } + public void Accept(Java.Lang.Object result) + { + if (result != null) + { + _result = (T)Convert.ChangeType(result, typeof(T)); + } + Task.Start(); + } + } } From 0bf5c82b42e5453c3eec8d17949b796df5d5d014 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Fri, 16 Jun 2017 14:27:36 -0700 Subject: [PATCH 04/60] Missed 1 ConfigureAwait(false) --- .../Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs index b264bdfaf..5f97be4bb 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs @@ -348,7 +348,7 @@ private async Task TriggerIngestionAsync(State state, IList logs, string ba } // If the optional Install ID has no value, default to using empty GUID - var rawInstallId = await MobileCenter.GetInstallIdAsync(); + var rawInstallId = await MobileCenter.GetInstallIdAsync().ConfigureAwait(false); var installId = rawInstallId.HasValue ? rawInstallId.Value : Guid.Empty; using (var serviceCall = _ingestion.PrepareServiceCall(_appSecret, installId, logs)) { From b550dc9e898e099b0af194fba439fe7749aba32c Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Fri, 16 Jun 2017 15:36:36 -0700 Subject: [PATCH 05/60] Fix iOS puppet --- Apps/Contoso.iOS.Puppet/AppDelegate.cs | 4 +- .../Contoso.iOS.Puppet.csproj | 5 + .../ModulePages/AnalyticsController.cs | 8 +- .../AnalyticsController.designer.cs | 92 ++++++++++--------- .../ModulePages/CrashesController.cs | 8 +- .../ModulePages/CrashesController.designer.cs | 86 +++++++++-------- .../ModulePages/DistributeController.cs | 8 +- .../DistributeController.designer.cs | 42 +++++---- .../ModulePages/MobileCenter.storyboard | 84 ++++++++--------- .../ModulePages/MobileCenterController.cs | 6 +- .../TabBarController.designer.cs | 10 +- 11 files changed, 188 insertions(+), 165 deletions(-) diff --git a/Apps/Contoso.iOS.Puppet/AppDelegate.cs b/Apps/Contoso.iOS.Puppet/AppDelegate.cs index faa1a1a13..a56daef92 100644 --- a/Apps/Contoso.iOS.Puppet/AppDelegate.cs +++ b/Apps/Contoso.iOS.Puppet/AppDelegate.cs @@ -41,8 +41,8 @@ public override bool FinishedLaunching(UIApplication application, NSDictionary l MobileCenterLog.Verbose("THETAG", "THEMESSAGE", e); } - Analytics.Enabled = true; - System.Diagnostics.Debug.WriteLine("ANALYTICS: " + Analytics.Enabled.ToString()); + Analytics.SetEnabled(true); + System.Diagnostics.Debug.WriteLine("ANALYTICS: " + Analytics.IsEnabledAsync().Result); return true; } diff --git a/Apps/Contoso.iOS.Puppet/Contoso.iOS.Puppet.csproj b/Apps/Contoso.iOS.Puppet/Contoso.iOS.Puppet.csproj index 26c7a8555..9796e367c 100644 --- a/Apps/Contoso.iOS.Puppet/Contoso.iOS.Puppet.csproj +++ b/Apps/Contoso.iOS.Puppet/Contoso.iOS.Puppet.csproj @@ -190,4 +190,9 @@ + + + + mcs.exe + \ No newline at end of file diff --git a/Apps/Contoso.iOS.Puppet/ModulePages/AnalyticsController.cs b/Apps/Contoso.iOS.Puppet/ModulePages/AnalyticsController.cs index 8eb501d03..7086f8dab 100644 --- a/Apps/Contoso.iOS.Puppet/ModulePages/AnalyticsController.cs +++ b/Apps/Contoso.iOS.Puppet/ModulePages/AnalyticsController.cs @@ -49,8 +49,8 @@ public AnalyticsController(IntPtr handle) : base(handle) public override void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); - AnalyticsEnabledSwitch.On = Analytics.Enabled; - AnalyticsEnabledSwitch.Enabled = MobileCenter.Enabled; + AnalyticsEnabledSwitch.On = Analytics.IsEnabledAsync().Result; + AnalyticsEnabledSwitch.Enabled = MobileCenter.IsEnabledAsync().Result; NumPropertiesLabel.Text = mEventProperties.Count.ToString(); } @@ -67,8 +67,8 @@ public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender) partial void UpdateEnabled() { - Analytics.Enabled = AnalyticsEnabledSwitch.On; - AnalyticsEnabledSwitch.On = Analytics.Enabled; + Analytics.SetEnabled(AnalyticsEnabledSwitch.On); + AnalyticsEnabledSwitch.On = Analytics.IsEnabledAsync().Result; } partial void AddProperty() diff --git a/Apps/Contoso.iOS.Puppet/ModulePages/AnalyticsController.designer.cs b/Apps/Contoso.iOS.Puppet/ModulePages/AnalyticsController.designer.cs index 315273f39..ef4a34d9b 100644 --- a/Apps/Contoso.iOS.Puppet/ModulePages/AnalyticsController.designer.cs +++ b/Apps/Contoso.iOS.Puppet/ModulePages/AnalyticsController.designer.cs @@ -1,51 +1,57 @@ // WARNING // -// This file has been generated automatically by Xamarin Studio to store outlets and -// actions made in the UI designer. If it is removed, they will be lost. -// Manual changes to this file may not be handled correctly. +// This file has been generated automatically by Visual Studio from the outlets and +// actions declared in your storyboard file. +// Manual changes to this file will not be maintained. // using Foundation; +using System; using System.CodeDom.Compiler; namespace Contoso.iOS.Puppet { - [Register ("AnalyticsController")] - partial class AnalyticsController - { - [Outlet] - UIKit.UISwitch AnalyticsEnabledSwitch { get; set; } - - [Outlet] - UIKit.UITextField EventName { get; set; } - - [Outlet] - UIKit.UILabel NumPropertiesLabel { get; set; } - - [Action ("AddProperty")] - partial void AddProperty (); - - [Action ("TrackEvent")] - partial void TrackEvent (); - - [Action ("UpdateEnabled")] - partial void UpdateEnabled (); - - void ReleaseDesignerOutlets () - { - if (AnalyticsEnabledSwitch != null) { - AnalyticsEnabledSwitch.Dispose (); - AnalyticsEnabledSwitch = null; - } - - if (EventName != null) { - EventName.Dispose (); - EventName = null; - } - - if (NumPropertiesLabel != null) { - NumPropertiesLabel.Dispose (); - NumPropertiesLabel = null; - } - } - } -} + [Register ("AnalyticsController")] + partial class AnalyticsController + { + [Outlet] + UIKit.UISwitch AnalyticsEnabledSwitch { get; set; } + + + [Outlet] + UIKit.UITextField EventName { get; set; } + + + [Outlet] + UIKit.UILabel NumPropertiesLabel { get; set; } + + + [Action ("AddProperty")] + partial void AddProperty (); + + + [Action ("TrackEvent")] + partial void TrackEvent (); + + + [Action ("UpdateEnabled")] + partial void UpdateEnabled (); + + void ReleaseDesignerOutlets () + { + if (AnalyticsEnabledSwitch != null) { + AnalyticsEnabledSwitch.Dispose (); + AnalyticsEnabledSwitch = null; + } + + if (EventName != null) { + EventName.Dispose (); + EventName = null; + } + + if (NumPropertiesLabel != null) { + NumPropertiesLabel.Dispose (); + NumPropertiesLabel = null; + } + } + } +} \ No newline at end of file diff --git a/Apps/Contoso.iOS.Puppet/ModulePages/CrashesController.cs b/Apps/Contoso.iOS.Puppet/ModulePages/CrashesController.cs index ee24cc7f9..ef970bba5 100644 --- a/Apps/Contoso.iOS.Puppet/ModulePages/CrashesController.cs +++ b/Apps/Contoso.iOS.Puppet/ModulePages/CrashesController.cs @@ -15,14 +15,14 @@ public CrashesController(IntPtr handle) : base(handle) public override void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); - CrashesEnabledSwitch.On = Crashes.Enabled; - CrashesEnabledSwitch.Enabled = MobileCenter.Enabled; + CrashesEnabledSwitch.On = Crashes.IsEnabledAsync().Result; + CrashesEnabledSwitch.Enabled = MobileCenter.IsEnabledAsync().Result; } partial void UpdateEnabled() { - Crashes.Enabled = CrashesEnabledSwitch.On; - CrashesEnabledSwitch.On = Crashes.Enabled; + Crashes.SetEnabled(CrashesEnabledSwitch.On); + CrashesEnabledSwitch.On = Crashes.IsEnabledAsync().Result; } partial void TestCrash() diff --git a/Apps/Contoso.iOS.Puppet/ModulePages/CrashesController.designer.cs b/Apps/Contoso.iOS.Puppet/ModulePages/CrashesController.designer.cs index b0dcf3610..356e165b0 100644 --- a/Apps/Contoso.iOS.Puppet/ModulePages/CrashesController.designer.cs +++ b/Apps/Contoso.iOS.Puppet/ModulePages/CrashesController.designer.cs @@ -1,47 +1,55 @@ // WARNING // -// This file has been generated automatically by Xamarin Studio to store outlets and -// actions made in the UI designer. If it is removed, they will be lost. -// Manual changes to this file may not be handled correctly. +// This file has been generated automatically by Visual Studio from the outlets and +// actions declared in your storyboard file. +// Manual changes to this file will not be maintained. // using Foundation; +using System; using System.CodeDom.Compiler; namespace Contoso.iOS.Puppet { - [Register ("CrashesController")] - partial class CrashesController - { - [Outlet] - UIKit.UISwitch CrashesEnabledSwitch { get; set; } - - [Action ("CatchNullReferenceException")] - partial void CatchNullReferenceException (); - - [Action ("CrashAsync")] - partial void CrashAsync (); - - [Action ("CrashWithAggregateException")] - partial void CrashWithAggregateException (); - - [Action ("CrashWithNullReferenceException")] - partial void CrashWithNullReferenceException (); - - [Action ("DivideByZero")] - partial void DivideByZero (); - - [Action ("TestCrash")] - partial void TestCrash (); - - [Action ("UpdateEnabled")] - partial void UpdateEnabled (); - - void ReleaseDesignerOutlets () - { - if (CrashesEnabledSwitch != null) { - CrashesEnabledSwitch.Dispose (); - CrashesEnabledSwitch = null; - } - } - } -} + [Register ("CrashesController")] + partial class CrashesController + { + [Outlet] + UIKit.UISwitch CrashesEnabledSwitch { get; set; } + + + [Action ("CatchNullReferenceException")] + partial void CatchNullReferenceException (); + + + [Action ("CrashAsync")] + partial void CrashAsync (); + + + [Action ("CrashWithAggregateException")] + partial void CrashWithAggregateException (); + + + [Action ("CrashWithNullReferenceException")] + partial void CrashWithNullReferenceException (); + + + [Action ("DivideByZero")] + partial void DivideByZero (); + + + [Action ("TestCrash")] + partial void TestCrash (); + + + [Action ("UpdateEnabled")] + partial void UpdateEnabled (); + + void ReleaseDesignerOutlets () + { + if (CrashesEnabledSwitch != null) { + CrashesEnabledSwitch.Dispose (); + CrashesEnabledSwitch = null; + } + } + } +} \ No newline at end of file diff --git a/Apps/Contoso.iOS.Puppet/ModulePages/DistributeController.cs b/Apps/Contoso.iOS.Puppet/ModulePages/DistributeController.cs index 0c859924e..9f70fa74c 100644 --- a/Apps/Contoso.iOS.Puppet/ModulePages/DistributeController.cs +++ b/Apps/Contoso.iOS.Puppet/ModulePages/DistributeController.cs @@ -14,14 +14,14 @@ public DistributeController(IntPtr handle) : base(handle) public override void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); - DistributeEnabledSwitch.On = Distribute.Enabled; - DistributeEnabledSwitch.Enabled = MobileCenter.Enabled; + DistributeEnabledSwitch.On = Distribute.IsEnabledAsync().Result; + DistributeEnabledSwitch.Enabled = MobileCenter.IsEnabledAsync().Result; } partial void UpdateEnabled() { - Distribute.Enabled = DistributeEnabledSwitch.On; - DistributeEnabledSwitch.On = Distribute.Enabled; + Distribute.SetEnabled(DistributeEnabledSwitch.On); + DistributeEnabledSwitch.On = Distribute.IsEnabledAsync().Result; } } } diff --git a/Apps/Contoso.iOS.Puppet/ModulePages/DistributeController.designer.cs b/Apps/Contoso.iOS.Puppet/ModulePages/DistributeController.designer.cs index ecd2ea8ed..89016c448 100644 --- a/Apps/Contoso.iOS.Puppet/ModulePages/DistributeController.designer.cs +++ b/Apps/Contoso.iOS.Puppet/ModulePages/DistributeController.designer.cs @@ -1,29 +1,31 @@ // WARNING // -// This file has been generated automatically by Xamarin Studio to store outlets and -// actions made in the UI designer. If it is removed, they will be lost. -// Manual changes to this file may not be handled correctly. +// This file has been generated automatically by Visual Studio from the outlets and +// actions declared in your storyboard file. +// Manual changes to this file will not be maintained. // using Foundation; +using System; using System.CodeDom.Compiler; namespace Contoso.iOS.Puppet { - [Register ("DistributeController")] - partial class DistributeController - { - [Outlet] - UIKit.UISwitch DistributeEnabledSwitch { get; set; } + [Register ("DistributeController")] + partial class DistributeController + { + [Outlet] + UIKit.UISwitch DistributeEnabledSwitch { get; set; } - [Action ("UpdateEnabled")] - partial void UpdateEnabled (); - - void ReleaseDesignerOutlets () - { - if (DistributeEnabledSwitch != null) { - DistributeEnabledSwitch.Dispose (); - DistributeEnabledSwitch = null; - } - } - } -} + + [Action ("UpdateEnabled")] + partial void UpdateEnabled (); + + void ReleaseDesignerOutlets () + { + if (DistributeEnabledSwitch != null) { + DistributeEnabledSwitch.Dispose (); + DistributeEnabledSwitch = null; + } + } + } +} \ No newline at end of file diff --git a/Apps/Contoso.iOS.Puppet/ModulePages/MobileCenter.storyboard b/Apps/Contoso.iOS.Puppet/ModulePages/MobileCenter.storyboard index fcc25c388..c48016b52 100644 --- a/Apps/Contoso.iOS.Puppet/ModulePages/MobileCenter.storyboard +++ b/Apps/Contoso.iOS.Puppet/ModulePages/MobileCenter.storyboard @@ -1,5 +1,5 @@ - - + + @@ -14,17 +14,17 @@ - + - + - + /// Value indicating whether channel should be enabled or disabled - Task SetEnabledAsync(bool enabled); + void SetEnabled(bool enabled); /// /// Stop all calls in progress and deactivate this channel diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenter.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenter.cs index f0cdcbfb4..40f50ca5e 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenter.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenter.cs @@ -236,7 +236,7 @@ private bool InstanceEnabled return; } - _channelGroup?.SetEnabledAsync(value); + _channelGroup?.SetEnabled(value); _applicationSettings[EnabledKey] = value; foreach (var service in _services) diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenterService.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenterService.cs index f7913b9ad..ede5aa5fa 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenterService.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/MobileCenterService.cs @@ -97,7 +97,7 @@ public virtual bool InstanceEnabled MobileCenterLog.Info(LogTag, $"{ServiceName} service has already been {enabledString}."); return; } - Channel?.SetEnabledAsync(value); + Channel?.SetEnabled(value); _applicationSettings[EnabledPreferenceKey] = value; MobileCenterLog.Info(LogTag, $"{ServiceName} service has been {enabledString}"); } @@ -118,7 +118,7 @@ public virtual void OnChannelGroupReady(IChannelGroup channelGroup, string appSe Channel = channelGroup.AddChannel(ChannelName, TriggerCount, TriggerInterval, TriggerMaxParallelRequests); var enabled = MobileCenter.Enabled && InstanceEnabled; _applicationSettings[EnabledPreferenceKey] = enabled; - Channel.SetEnabledAsync(enabled); + Channel.SetEnabled(enabled); } } diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Storage/IStorage.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Storage/IStorage.cs index 2183d2cad..d0c4df69e 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Storage/IStorage.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Storage/IStorage.cs @@ -7,11 +7,11 @@ namespace Microsoft.Azure.Mobile.Storage { public interface IStorage : IDisposable { - Task PutLogAsync(string channelName, Log log); - Task DeleteLogsAsync(string channelName, string batchId); - Task DeleteLogsAsync(string channelName); + Task PutLog(string channelName, Log log); + Task DeleteLogs(string channelName, string batchId); + Task DeleteLogs(string channelName); Task CountLogsAsync(string channelName); - Task ClearPendingLogStateAsync(string channelName); + Task ClearPendingLogState(string channelName); Task GetLogsAsync(string channelName, int limit, List logs); Task ShutdownAsync(TimeSpan timeout); } diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Storage/Storage.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Storage/Storage.cs index 7f05543b2..f8c700759 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Storage/Storage.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Storage/Storage.cs @@ -52,7 +52,7 @@ internal Storage(IStorageAdapter adapter) { _storageAdapter = adapter; _queue.Add(new Task(() => InitializeDatabaseAsync().Wait())); - _queueFlushTask = Task.Run(FlushQueue); + _queueFlushTask = Task.Run(FlushQueueAsync); } /// @@ -61,7 +61,7 @@ internal Storage(IStorageAdapter adapter) /// The name of the channel associated with the log /// The log to add /// - public async Task PutLogAsync(string channelName, Log log) + public Task PutLog(string channelName, Log log) { var task = new Task(() => { @@ -78,7 +78,7 @@ public async Task PutLogAsync(string channelName, Log log) throw new StorageException("The operation has been cancelled"); } _flushSemaphore.Release(); - await task.ConfigureAwait(false); + return task; } /// @@ -87,7 +87,7 @@ public async Task PutLogAsync(string channelName, Log log) /// The name of the channel associated with the batch /// The batch identifier /// - public async Task DeleteLogsAsync(string channelName, string batchId) + public Task DeleteLogs(string channelName, string batchId) { var task = new Task(() => { @@ -125,7 +125,7 @@ public async Task DeleteLogsAsync(string channelName, string batchId) throw new StorageException("The operation has been cancelled"); } _flushSemaphore.Release(); - await task.ConfigureAwait(false); + return task; } /// @@ -133,7 +133,7 @@ public async Task DeleteLogsAsync(string channelName, string batchId) /// /// Name of the channel to delete logs for /// - public async Task DeleteLogsAsync(string channelName) + public Task DeleteLogs(string channelName) { var task = new Task(() => { @@ -141,7 +141,7 @@ public async Task DeleteLogsAsync(string channelName) { MobileCenterLog.Debug(MobileCenterLog.LogTag, $"Deleting all logs from storage for channel '{channelName}'"); - ClearPendingLogState(channelName); + ClearPendingLogStateWithoutEnqueue(channelName); _storageAdapter.DeleteAsync(entry => entry.Channel == channelName) .Wait(); } @@ -159,7 +159,7 @@ public async Task DeleteLogsAsync(string channelName) throw new StorageException("The operation has been cancelled"); } _flushSemaphore.Release(); - await task.ConfigureAwait(false); + return task; } /// @@ -191,11 +191,11 @@ public async Task CountLogsAsync(string channelName) /// Asynchronously clears the stored state of logs that have been retrieved /// /// - public async Task ClearPendingLogStateAsync(string channelName) + public Task ClearPendingLogState(string channelName) { var task = new Task(() => { - ClearPendingLogState(channelName); + ClearPendingLogStateWithoutEnqueue(channelName); MobileCenterLog.Debug(MobileCenterLog.LogTag, $"Clear pending log states for channel {channelName}"); }); try @@ -207,10 +207,10 @@ public async Task ClearPendingLogStateAsync(string channelName) throw new StorageException("The operation has been cancelled"); } _flushSemaphore.Release(); - await task.ConfigureAwait(false); + return task; } - private void ClearPendingLogState(string channelName) + private void ClearPendingLogStateWithoutEnqueue(string channelName) { var fullIdentifiers = new List(); @@ -364,7 +364,7 @@ private static bool ChannelMatchesIdentifier(string channelName, string identifi } // Flushes the queue - private async Task FlushQueue() + private async Task FlushQueueAsync() { while (true) { diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Utils/Synchronization/StatefulMutex.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Utils/Synchronization/StatefulMutex.cs index b2e769134..143e690aa 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Utils/Synchronization/StatefulMutex.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Utils/Synchronization/StatefulMutex.cs @@ -42,13 +42,24 @@ public bool IsCurrent(State state) { return _state.Equals(state); } - + public LockHolder GetLock() { _mutex.Wait(); return new LockHolder(this); } + public LockHolder GetLock(State state) + { + _mutex.Wait(); + if (IsCurrent(state)) + { + return new LockHolder(this); + } + _mutex.Release(); + throw new StatefulMutexException("Cannot lock mutex with expired state"); + } + public async Task GetLockAsync() { await _mutex.WaitAsync().ConfigureAwait(false); @@ -58,12 +69,12 @@ public async Task GetLockAsync() public async Task GetLockAsync(State state) { await _mutex.WaitAsync().ConfigureAwait(false); - if (!IsCurrent(state)) + if (IsCurrent(state)) { - _mutex.Release(); - throw new StatefulMutexException("Cannot lock mutex with expired state"); + return new LockHolder(this); } - return new LockHolder(this); + _mutex.Release(); + throw new StatefulMutexException("Cannot lock mutex with expired state"); } /// diff --git a/Tests/Microsoft.Azure.Mobile.Test.UWP/MobileCenterTest.cs b/Tests/Microsoft.Azure.Mobile.Test.UWP/MobileCenterTest.cs index 3660f7938..e040596fb 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.UWP/MobileCenterTest.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.UWP/MobileCenterTest.cs @@ -34,14 +34,17 @@ public void VerifyPlatformId() [TestMethod] public void SetCountryCode() { - const string CountryCode = "US"; - int informationInvalidated = 0; - EventHandler OnInformationInvalidated = delegate { informationInvalidated++; }; - DeviceInformationHelper.InformationInvalidated += OnInformationInvalidated; - MobileCenter.SetCountryCode(CountryCode); - MobileCenter.SetCountryCode("INVALID"); - DeviceInformationHelper.InformationInvalidated -= OnInformationInvalidated; - Assert.AreEqual(informationInvalidated, 1); + var informationInvalidated = false; + + void InformationInvalidated(object sender, EventArgs e) + { + informationInvalidated = true; + } + + DeviceInformationHelper.InformationInvalidated += InformationInvalidated; + MobileCenter.SetCountryCode("US"); + DeviceInformationHelper.InformationInvalidated -= InformationInvalidated; + Assert.AreEqual(informationInvalidated, true); } } } diff --git a/Tests/Microsoft.Azure.Mobile.Test.Windows/Channel/ChannelGroupTest.cs b/Tests/Microsoft.Azure.Mobile.Test.Windows/Channel/ChannelGroupTest.cs index b03faa767..fb47e5db0 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.Windows/Channel/ChannelGroupTest.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.Windows/Channel/ChannelGroupTest.cs @@ -148,13 +148,13 @@ public void TestEnableChannelGroup() { _channelGroup.AddChannel(mockedChannel); } - _channelGroup.SetEnabledAsync(true); - _channelGroup.SetEnabledAsync(false); + _channelGroup.SetEnabled(true); + _channelGroup.SetEnabled(false); foreach (var channelMock in channelMocks.Select(mock => mock as Mock)) { - channelMock.Verify(channel => channel.SetEnabledAsync(It.Is(p => p)), Times.Once()); - channelMock.Verify(channel => channel.SetEnabledAsync(It.Is(p => !p)), Times.Once()); + channelMock.Verify(channel => channel.SetEnabled(It.Is(p => p)), Times.Once()); + channelMock.Verify(channel => channel.SetEnabled(It.Is(p => !p)), Times.Once()); } } @@ -162,7 +162,7 @@ public void TestEnableChannelGroup() public void TestDisposeChannelGroup() { _channelGroup.Dispose(); - Assert.ThrowsException(() => _channelGroup.SetEnabledAsync(true)); + Assert.ThrowsException(() => _channelGroup.SetEnabled(true)); } /// diff --git a/Tests/Microsoft.Azure.Mobile.Test.Windows/Channel/ChannelTest.cs b/Tests/Microsoft.Azure.Mobile.Test.Windows/Channel/ChannelTest.cs index 6d4e4da0f..427bab509 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.Windows/Channel/ChannelTest.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.Windows/Channel/ChannelTest.cs @@ -63,7 +63,7 @@ public void ChannelEnabledByDefault() [TestMethod] public void DisableChannel() { - _channel.SetEnabledAsync(false).RunNotAsync(); + _channel.SetEnabled(false); Assert.IsFalse(_channel.IsEnabled); } @@ -74,8 +74,8 @@ public void DisableChannel() [TestMethod] public void EnableChannel() { - _channel.SetEnabledAsync(false).RunNotAsync(); - _channel.SetEnabledAsync(true).RunNotAsync(); + _channel.SetEnabled(false); + _channel.SetEnabled(true); Assert.IsTrue(_channel.IsEnabled); } @@ -118,7 +118,7 @@ public void EnqueueMaxLogs() [TestMethod] public void EnqueueWhileDisabled() { - _channel.SetEnabledAsync(false).RunNotAsync(); + _channel.SetEnabled(false); var log = new TestLog(); _channel.EnqueueAsync(log).RunNotAsync(); Assert.IsFalse(SentLogOccurred(1)); @@ -183,7 +183,7 @@ public void ChannelInvokesSendingLogEventAfterEnabling() _channel.EnqueueAsync(new TestLog()).RunNotAsync(); } - _channel.SetEnabledAsync(true).RunNotAsync(); + _channel.SetEnabled(true); Assert.IsTrue(SendingLogOccurred(MaxLogsPerBatch)); } @@ -194,7 +194,7 @@ public void ChannelInvokesSendingLogEventAfterEnabling() [TestMethod] public void ChannelInvokesFailedToSendLogEventAfterDisabling() { - _channel.SetEnabledAsync(false).RunNotAsync(); + _channel.SetEnabled(false); for (int i = 0; i < MaxLogsPerBatch; ++i) { _channel.EnqueueAsync(new TestLog()).RunNotAsync(); @@ -214,7 +214,7 @@ public void ClearLogs() _channel.EnqueueAsync(new TestLog()).RunNotAsync(); _channel.ClearAsync().RunNotAsync(); - _channel.SetEnabledAsync(true).RunNotAsync(); + _channel.SetEnabled(true); Assert.IsFalse(SendingLogOccurred(1)); } @@ -226,7 +226,7 @@ public void ClearLogs() public void DisposeChannelTest() { _channel.Dispose(); - Assert.ThrowsExceptionAsync(() => _channel.SetEnabledAsync(true)).RunNotAsync(); + Assert.ThrowsException(() => _channel.SetEnabled(true)); } /// @@ -236,7 +236,7 @@ public void DisposeChannelTest() public void ThrowStorageExceptionInDeleteLogsTime() { var storage = new Mock(); - storage.Setup(s => s.DeleteLogsAsync(It.IsAny(), It.IsAny())).Throws(); + storage.Setup(s => s.DeleteLogs(It.IsAny(), It.IsAny())).Throws(); storage.Setup(s => s.GetLogsAsync(It.IsAny(), It.IsAny(), It.IsAny>())).Returns(Task.FromResult("")); Mobile.Channel.Channel channel = new Mobile.Channel.Channel("name", 1, _batchTimeSpan, 1, _appSecret, _mockIngestion, storage.Object); @@ -245,7 +245,7 @@ public void ThrowStorageExceptionInDeleteLogsTime() channel.ShutdownAsync().RunNotAsync(); channel.EnqueueAsync(new TestLog()).RunNotAsync(); - channel.SetEnabledAsync(true).RunNotAsync(); + channel.SetEnabled(true); // Not throw any exception } @@ -291,7 +291,7 @@ public void IngestionClosedOnNonRecoverableHttpError() private void SetChannelWithTimeSpan(TimeSpan timeSpan) { _storage = new Mobile.Storage.Storage(); - _storage.DeleteLogsAsync(ChannelName).RunNotAsync(); + _storage.DeleteLogs(ChannelName); _channel = new Mobile.Channel.Channel(ChannelName, MaxLogsPerBatch, timeSpan, MaxParallelBatches, _appSecret, _mockIngestion, _storage); MakeIngestionCallsSucceed(); diff --git a/Tests/Microsoft.Azure.Mobile.Test.Windows/Ingestion/Models/CustomPropertiesLogTest.cs b/Tests/Microsoft.Azure.Mobile.Test.Windows/Ingestion/Models/CustomPropertiesLogTest.cs index c6914b7f9..8b760a9d7 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.Windows/Ingestion/Models/CustomPropertiesLogTest.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.Windows/Ingestion/Models/CustomPropertiesLogTest.cs @@ -54,8 +54,8 @@ public void SaveCustomPropertiesLog() }; var storage = new Mobile.Storage.Storage(); - storage.DeleteLogsAsync(StorageTestChannelName).RunNotAsync(); - storage.PutLogAsync(StorageTestChannelName, addedLog).RunNotAsync(); + storage.DeleteLogs(StorageTestChannelName); + storage.PutLog(StorageTestChannelName, addedLog); var retrievedLogs = new List(); storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).RunNotAsync(); var retrievedLog = retrievedLogs[0] as CustomPropertiesLog; diff --git a/Tests/Microsoft.Azure.Mobile.Test.Windows/Ingestion/Models/StartServiceLogTest.cs b/Tests/Microsoft.Azure.Mobile.Test.Windows/Ingestion/Models/StartServiceLogTest.cs index 92dc0f03a..4adf559c9 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.Windows/Ingestion/Models/StartServiceLogTest.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.Windows/Ingestion/Models/StartServiceLogTest.cs @@ -62,8 +62,8 @@ public void SaveStartServiceLog() }; var storage = new Mobile.Storage.Storage(); - storage.DeleteLogsAsync(StorageTestChannelName).RunNotAsync(); - storage.PutLogAsync(StorageTestChannelName, addedLog).RunNotAsync(); + storage.DeleteLogs(StorageTestChannelName); + storage.PutLog(StorageTestChannelName, addedLog); var retrievedLogs = new List(); storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).RunNotAsync(); var retrievedLog = retrievedLogs[0] as StartServiceLog; diff --git a/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterServiceTest.cs b/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterServiceTest.cs index a92888961..8cd76765d 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterServiceTest.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterServiceTest.cs @@ -101,7 +101,7 @@ public void SetEnabledDifferentValue() _testService.InstanceEnabled = false; _mockSettings.VerifySet(settings => settings[_testService.PublicEnabledPreferenceKey] = It.IsAny(), Times.Exactly(2)); - _mockChannel.Verify(channel => channel.SetEnabledAsync(It.IsAny()), Times.Exactly(2)); + _mockChannel.Verify(channel => channel.SetEnabled(It.IsAny()), Times.Exactly(2)); } /// @@ -120,7 +120,7 @@ public void OnChannelGroupReady() channelGroup.AddChannel(_testService.PublicChannelName, It.IsAny(), It.IsAny(), It.IsAny()), Times.Once()); _mockSettings.VerifySet(settings => settings[_testService.PublicEnabledPreferenceKey] = true, Times.Once()); - _mockChannel.Verify(channel => channel.SetEnabledAsync(true), Times.Once()); + _mockChannel.Verify(channel => channel.SetEnabled(true), Times.Once()); Assert.AreSame(_mockChannelGroup.Object, _testService.PublicChannelGroup); } @@ -141,7 +141,7 @@ public void OnChannelGroupReadyMobileCenterIsDisabled() channelGroup.AddChannel(_testService.PublicChannelName, It.IsAny(), It.IsAny(), It.IsAny()), Times.Once()); _mockSettings.VerifySet(settings => settings[_testService.PublicEnabledPreferenceKey] = false, Times.Once()); - _mockChannel.Verify(channel => channel.SetEnabledAsync(false), Times.Once()); + _mockChannel.Verify(channel => channel.SetEnabled(false), Times.Once()); } /// diff --git a/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterTest.cs b/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterTest.cs index 0f6a19528..70358e4b7 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterTest.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.Windows/MobileCenterTest.cs @@ -144,7 +144,7 @@ public void SetEnabledSameValue() MockMobileCenterService.Instance.MockInstance.VerifySet( service => service.InstanceEnabled = It.IsAny(), Times.Never()); settingsMock.VerifySet(settings => settings[MobileCenter.EnabledKey] = It.IsAny(), Times.Never()); - channelGroupMock.Verify(channelGroup => channelGroup.SetEnabledAsync(It.IsAny()), Times.Never()); + channelGroupMock.Verify(channelGroup => channelGroup.SetEnabled(It.IsAny()), Times.Never()); } /// @@ -166,7 +166,7 @@ public void SetEnabledDifferentValueAfterConfigure() MockMobileCenterService.Instance.MockInstance.VerifySet(service => service.InstanceEnabled = setVal, Times.Once()); settingsMock.VerifySet(settings => settings[MobileCenter.EnabledKey] = setVal, Times.Once()); - channelGroupMock.Verify(channelGroup => channelGroup.SetEnabledAsync(setVal), Times.Once()); + channelGroupMock.Verify(channelGroup => channelGroup.SetEnabled(setVal), Times.Once()); } /// diff --git a/Tests/Microsoft.Azure.Mobile.Test.Windows/Storage/FakeStorageTest.cs b/Tests/Microsoft.Azure.Mobile.Test.Windows/Storage/FakeStorageTest.cs index 7bb69b3aa..a73c05463 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.Windows/Storage/FakeStorageTest.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.Windows/Storage/FakeStorageTest.cs @@ -31,8 +31,8 @@ public void ShutdownTimeout() // Ignore warnings because we just want to "fire and forget" #pragma warning disable 4014 - storage.PutLogAsync(StorageTestChannelName, new TestLog()); - storage.PutLogAsync(StorageTestChannelName, new TestLog()); + storage.PutLog(StorageTestChannelName, new TestLog()); + storage.PutLog(StorageTestChannelName, new TestLog()); #pragma warning restore 4014 var result = storage.ShutdownAsync(TimeSpan.FromTicks(1)).RunNotAsync(); @@ -54,8 +54,8 @@ public void ShutdownSucceed() // Ignore warnings because we just want to "fire and forget" #pragma warning disable 4014 - storage.PutLogAsync(StorageTestChannelName, new TestLog()); - storage.PutLogAsync(StorageTestChannelName, new TestLog()); + storage.PutLog(StorageTestChannelName, new TestLog()); + storage.PutLog(StorageTestChannelName, new TestLog()); #pragma warning restore 4014 var result = storage.ShutdownAsync(TimeSpan.FromSeconds(100)).RunNotAsync(); @@ -110,8 +110,8 @@ public void StorageThrowsStorageException() .Throws(new StorageException()); var fakeStorage = new Mobile.Storage.Storage(mockAdapter.Object); - Assert.ThrowsException(() => fakeStorage.PutLogAsync("channel_name", new TestLog()).RunNotAsync()); - Assert.ThrowsException(() => fakeStorage.DeleteLogsAsync("channel_name", string.Empty).RunNotAsync()); + Assert.ThrowsException(() => fakeStorage.PutLog("channel_name", new TestLog()).RunNotAsync()); + Assert.ThrowsException(() => fakeStorage.DeleteLogs("channel_name", string.Empty).RunNotAsync()); Assert.ThrowsException(() => fakeStorage.CountLogsAsync("channel_name").RunNotAsync()); Assert.ThrowsException(() => fakeStorage.GetLogsAsync("channel_name", 1, new List()).RunNotAsync()); } diff --git a/Tests/Microsoft.Azure.Mobile.Test.Windows/Storage/MockStorage.cs b/Tests/Microsoft.Azure.Mobile.Test.Windows/Storage/MockStorage.cs index 8160bb748..14255296b 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.Windows/Storage/MockStorage.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.Windows/Storage/MockStorage.cs @@ -8,7 +8,7 @@ namespace Microsoft.Azure.Mobile.Test.Storage { public class MockStorage : IStorage { - public Task ClearPendingLogStateAsync(string channelName) + public Task ClearPendingLogState(string channelName) { return TaskExtension.GetCompletedTask(); } @@ -18,12 +18,12 @@ public Task CountLogsAsync(string channelName) return TaskExtension.GetCompletedTask(1); } - public Task DeleteLogsAsync(string channelName) + public Task DeleteLogs(string channelName) { return TaskExtension.GetCompletedTask(); } - public Task DeleteLogsAsync(string channelName, string batchId) + public Task DeleteLogs(string channelName, string batchId) { return TaskExtension.GetCompletedTask(); } @@ -33,7 +33,7 @@ public Task GetLogsAsync(string channelName, int limit, List logs) return TaskExtension.GetCompletedTask(Guid.NewGuid().ToString()); } - public Task PutLogAsync(string channelName, Log log) + public Task PutLog(string channelName, Log log) { return TaskExtension.GetCompletedTask(); } diff --git a/Tests/Microsoft.Azure.Mobile.Test.Windows/Storage/StorageTest.cs b/Tests/Microsoft.Azure.Mobile.Test.Windows/Storage/StorageTest.cs index 930d2989c..d0fbd2b82 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.Windows/Storage/StorageTest.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.Windows/Storage/StorageTest.cs @@ -15,7 +15,7 @@ public class StorageTest [TestInitialize] public void InitializeStorageTest() { - _storage.DeleteLogsAsync(StorageTestChannelName).RunNotAsync(); + _storage.DeleteLogs(StorageTestChannelName); } /// @@ -47,7 +47,7 @@ public void CountNonemptyStorage() public void PutOneLog() { var addedLog = TestLog.CreateTestLog(); - _storage.PutLogAsync(StorageTestChannelName, addedLog).RunNotAsync(); + _storage.PutLog(StorageTestChannelName, addedLog); var retrievedLogs = new List(); _storage.GetLogsAsync(StorageTestChannelName, 1, retrievedLogs).RunNotAsync(); var retrievedLog = retrievedLogs[0]; @@ -61,7 +61,7 @@ public void PutOneLog() public void DeleteLogsNoBatchId() { PutNLogs(5); - _storage.DeleteLogsAsync(StorageTestChannelName).RunNotAsync(); + _storage.DeleteLogs(StorageTestChannelName); var count = _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); Assert.AreEqual(0, count); } @@ -77,7 +77,7 @@ public void DeleteLogsWithBatchId() var addedLogs = PutNLogs(numLogsToAdd); var retrievedLogs = new List(); var batchId = _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogs).RunNotAsync(); - _storage.DeleteLogsAsync(StorageTestChannelName, batchId).RunNotAsync(); + _storage.DeleteLogs(StorageTestChannelName, batchId); var numLogsRemaining = _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); Assert.AreEqual(numLogsToAdd - retrievedLogs.Count, numLogsRemaining); } @@ -177,7 +177,7 @@ public void GetDuplicateLogs() public void GetLogsFromChannelWithSimilarNames() { var fakeChannelName = StorageTestChannelName.Substring(0, StorageTestChannelName.Length - 1); - _storage.PutLogAsync(StorageTestChannelName, TestLog.CreateTestLog()).RunNotAsync(); + _storage.PutLog(StorageTestChannelName, TestLog.CreateTestLog()); var retrievedLogs = new List(); var batchId = _storage.GetLogsAsync(fakeChannelName, 1, retrievedLogs).RunNotAsync(); Assert.IsNull(batchId); @@ -195,7 +195,7 @@ public void ClearPendingState() var retrievedLogsFirstTry = new List(); var retrievedLogsSecondTry = new List(); _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsFirstTry).RunNotAsync(); - _storage.ClearPendingLogStateAsync(StorageTestChannelName).RunNotAsync(); + _storage.ClearPendingLogState(StorageTestChannelName); _storage.GetLogsAsync(StorageTestChannelName, limit, retrievedLogsSecondTry).RunNotAsync(); CollectionAssert.AreEquivalent(addedLogs, retrievedLogsFirstTry); CollectionAssert.AreEquivalent(addedLogs, retrievedLogsSecondTry); @@ -209,6 +209,10 @@ public void FailToGetALog() { var invalidLogEntry = new Mobile.Storage.Storage.LogEntry { Channel = StorageTestChannelName, Log = "good luck deserializing me!" }; var connection = new SQLiteConnection("Microsoft.Azure.Mobile.Storage"); + + // Perform an arbitrary operation and wait on it to complete so that database is free when invalid log + // is inserted. + _storage.CountLogsAsync(StorageTestChannelName).RunNotAsync(); connection.Insert(invalidLogEntry); var logs = new List(); var batchId = _storage.GetLogsAsync(StorageTestChannelName, 4, logs).RunNotAsync(); @@ -228,9 +232,8 @@ private List PutNLogs(int n) { var testLog = TestLog.CreateTestLog(); addedLogs.Add(testLog); - putLogTasks[i] = _storage.PutLogAsync(StorageTestChannelName, testLog); + putLogTasks[i] = _storage.PutLog(StorageTestChannelName, testLog); } - Task.WaitAll(putLogTasks); return addedLogs; } From 960680f9a7e640aef8891cda49be7afef6393a24 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Tue, 11 Jul 2017 13:14:36 -0700 Subject: [PATCH 58/60] Use version 0.14.0 --- Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml | 2 +- Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs | 4 ++-- .../Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml | 2 +- .../Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs | 4 ++-- .../Contoso.Forms.Puppet.UWP/Package.appxmanifest | 2 +- .../Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs | 2 +- Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist | 4 ++-- .../Contoso.Forms.Puppet/Properties/AssemblyInfo.cs | 4 ++-- Apps/Contoso.UWP.Puppet/Package.appxmanifest | 2 +- Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs | 2 +- Apps/Contoso.iOS.Puppet/Info.plist | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.Azure.Mobile.Android/Properties/AssemblyInfo.cs | 4 ++-- SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/WrapperSdk.cs | 2 +- .../Microsoft.Azure.Mobile.UWP/Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.Azure.Mobile.iOS/Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.Azure.Mobile/Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.Azure.Mobile.Crashes/Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Microsoft.Azure.Mobile.Push/Properties/AssemblyInfo.cs | 4 ++-- Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs | 4 ++-- Tests/Droid/Properties/AndroidManifest.xml | 2 +- Tests/Droid/Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- Tests/Microsoft.Azure.Mobile.NET/Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- Tests/Microsoft.Azure.Mobile.Test.UWP/Package.appxmanifest | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 ++-- Tests/iOS/Info.plist | 4 ++-- 53 files changed, 93 insertions(+), 93 deletions(-) diff --git a/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml b/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml index 876824a88..ab1707c2d 100644 --- a/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml +++ b/Apps/Contoso.Android.Puppet/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs index 341b0a6be..71847ff6a 100644 --- a/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.Android.Puppet/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml index 20aa4be89..2aca1c260 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs index 1fced114a..d63607b40 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AssemblyInfo.cs @@ -19,8 +19,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Package.appxmanifest b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Package.appxmanifest index bec6a0f20..7d3956d1a 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Package.appxmanifest +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Package.appxmanifest @@ -1,6 +1,6 @@ - + MobileCenter-Forms-UWP-Puppet diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs index 1101aa065..f744ed28d 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.UWP/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] +[assembly: AssemblyFileVersion("0.14.0.0")] [assembly: ComVisible(false)] diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist index 358112b15..b53775599 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.iOS/Info.plist @@ -5,9 +5,9 @@ CFBundleIdentifier com.microsoft.azure.mobile.xamarin.forms.puppet CFBundleShortVersionString - 0.13.2 + 0.14.0 CFBundleVersion - 0.13.2 + 0.14.0 LSRequiresIPhoneOS MinimumOSVersion diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs index 801309cf2..8e979a267 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Apps/Contoso.UWP.Puppet/Package.appxmanifest b/Apps/Contoso.UWP.Puppet/Package.appxmanifest index 100e901d2..049c5d22b 100644 --- a/Apps/Contoso.UWP.Puppet/Package.appxmanifest +++ b/Apps/Contoso.UWP.Puppet/Package.appxmanifest @@ -1,6 +1,6 @@ - + MobileCenter-UWP-Puppet diff --git a/Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs b/Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs index 72b3e2856..8f36c7b79 100644 --- a/Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs +++ b/Apps/Contoso.UWP.Puppet/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] +[assembly: AssemblyFileVersion("0.14.0.0")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Apps/Contoso.iOS.Puppet/Info.plist b/Apps/Contoso.iOS.Puppet/Info.plist index 0a8cf3320..fc42327d7 100644 --- a/Apps/Contoso.iOS.Puppet/Info.plist +++ b/Apps/Contoso.iOS.Puppet/Info.plist @@ -7,9 +7,9 @@ CFBundleIdentifier com.microsoft.azure.mobile.xamarin.puppet CFBundleShortVersionString - 0.13.2 + 0.14.0 CFBundleVersion - 0.13.2 + 0.14.0 LSRequiresIPhoneOS MinimumOSVersion diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android.Bindings/Properties/AssemblyInfo.cs index c65a409c4..af9005402 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android.Bindings/Properties/AssemblyInfo.cs @@ -26,5 +26,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Properties/AssemblyInfo.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Properties/AssemblyInfo.cs index 8a435fe8d..3b81397d2 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Android/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/WrapperSdk.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/WrapperSdk.cs index 53263b22b..f39fe7a62 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/WrapperSdk.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Shared/WrapperSdk.cs @@ -5,6 +5,6 @@ public static class WrapperSdk public const string Name = "mobilecenter.xamarin"; /* We can't use reflection for assemblyInformationalVersion on iOS with "Link All" optimization. */ - internal const string Version = "0.13.2-SNAPSHOT"; + internal const string Version = "0.14.0-SNAPSHOT"; } } diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.UWP/Properties/AssemblyInfo.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.UWP/Properties/AssemblyInfo.cs index 9bc0049d7..b09bf8196 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.UWP/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.UWP/Properties/AssemblyInfo.cs @@ -25,7 +25,7 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] [assembly: ComVisible(false)] [assembly: InternalsVisibleTo("Microsoft.Azure.Mobile.Test.UWP")] \ No newline at end of file diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS.Bindings/Properties/AssemblyInfo.cs index 7039528cf..7f0da6d51 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS.Bindings/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/Properties/AssemblyInfo.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/Properties/AssemblyInfo.cs index 1f5963bdf..14ccb44c7 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.iOS/Properties/AssemblyInfo.cs @@ -23,5 +23,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile/Properties/AssemblyInfo.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile/Properties/AssemblyInfo.cs index 4ef3fb432..54a8c9b55 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android.Bindings/Properties/AssemblyInfo.cs index ace8d1a4f..bb7f851c5 100644 --- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android.Bindings/Properties/AssemblyInfo.cs @@ -18,8 +18,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android/Properties/AssemblyInfo.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android/Properties/AssemblyInfo.cs index de05f4ed1..128b9c60a 100644 --- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.Android/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.UWP/Properties/AssemblyInfo.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.UWP/Properties/AssemblyInfo.cs index d5ec880af..8cdeb3a09 100644 --- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.UWP/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.UWP/Properties/AssemblyInfo.cs @@ -29,6 +29,6 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] -[assembly: AssemblyFileVersion("0.13.2.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] [assembly: ComVisible(false)] diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS.Bindings/Properties/AssemblyInfo.cs index c7f0b60e5..2b7f0b5b7 100644 --- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS.Bindings/Properties/AssemblyInfo.cs @@ -30,5 +30,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Properties/AssemblyInfo.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Properties/AssemblyInfo.cs index a0295d362..9d91fcde5 100644 --- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics.iOS/Properties/AssemblyInfo.cs @@ -23,5 +23,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics/Properties/AssemblyInfo.cs b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics/Properties/AssemblyInfo.cs index f647e6874..e0d568ac1 100644 --- a/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterAnalytics/Microsoft.Azure.Mobile.Analytics/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android.Bindings/Properties/AssemblyInfo.cs index 693f42fa6..3ae96a228 100644 --- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android.Bindings/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/Properties/AssemblyInfo.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/Properties/AssemblyInfo.cs index 0f00e745e..8672d5977 100644 --- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.Android/Properties/AssemblyInfo.cs @@ -26,5 +26,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.UWP/Properties/AssemblyInfo.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.UWP/Properties/AssemblyInfo.cs index efe1c7eb9..ef5ad84b0 100644 --- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.UWP/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.UWP/Properties/AssemblyInfo.cs @@ -29,6 +29,6 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS.Bindings/Properties/AssemblyInfo.cs index 25b7120b0..22582436f 100644 --- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS.Bindings/Properties/AssemblyInfo.cs @@ -30,5 +30,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/Properties/AssemblyInfo.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/Properties/AssemblyInfo.cs index 261210d28..e29280239 100644 --- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes.iOS/Properties/AssemblyInfo.cs @@ -23,5 +23,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes/Properties/AssemblyInfo.cs b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes/Properties/AssemblyInfo.cs index b692257cf..1a461c8ee 100644 --- a/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterCrashes/Microsoft.Azure.Mobile.Crashes/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android.Bindings/Properties/AssemblyInfo.cs index 7035b742f..13b5ccd83 100644 --- a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android.Bindings/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android/Properties/AssemblyInfo.cs b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android/Properties/AssemblyInfo.cs index a0862dff0..14c019685 100644 --- a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.Android/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.iOS.Bindings/Properties/AssemblyInfo.cs index 96d1f13b7..367e56d66 100644 --- a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.iOS.Bindings/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.iOS/Properties/AssemblyInfo.cs b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.iOS/Properties/AssemblyInfo.cs index 3738ea558..22a247808 100644 --- a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.iOS/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute.iOS/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute/Properties/AssemblyInfo.cs b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute/Properties/AssemblyInfo.cs index 3e0519836..590d0b725 100644 --- a/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterDistribute/Microsoft.Azure.Mobile.Distribute/Properties/AssemblyInfo.cs @@ -25,5 +25,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android.Bindings/Properties/AssemblyInfo.cs b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android.Bindings/Properties/AssemblyInfo.cs index 2f7f6f2f7..3046e587b 100644 --- a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android.Bindings/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android/Properties/AssemblyInfo.cs b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android/Properties/AssemblyInfo.cs index 67af5692b..e63d29d54 100644 --- a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.Android/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.UWP/Properties/AssemblyInfo.cs b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.UWP/Properties/AssemblyInfo.cs index 75ac67fd2..c2596691f 100644 --- a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.UWP/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.UWP/Properties/AssemblyInfo.cs @@ -28,6 +28,6 @@ [assembly: ReferenceAssembly] #endif [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] +[assembly: AssemblyFileVersion("0.14.0.0")] [assembly: ComVisible(false)] [assembly: InternalsVisibleTo("Microsoft.Azure.Mobile.Test.UWP")] \ No newline at end of file diff --git a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.iOS.Bindings/Properties/AssemblyInfo.cs b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.iOS.Bindings/Properties/AssemblyInfo.cs index ebf2186d7..2612b5a96 100644 --- a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.iOS.Bindings/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.iOS.Bindings/Properties/AssemblyInfo.cs @@ -30,5 +30,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.iOS/Properties/AssemblyInfo.cs b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.iOS/Properties/AssemblyInfo.cs index 5d6e8c893..f84407b9f 100644 --- a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.iOS/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push.iOS/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push/Properties/AssemblyInfo.cs b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push/Properties/AssemblyInfo.cs index c00482409..c1260e32b 100644 --- a/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push/Properties/AssemblyInfo.cs +++ b/SDK/MobileCenterPush/Microsoft.Azure.Mobile.Push/Properties/AssemblyInfo.cs @@ -24,5 +24,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs b/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs index 931e3bde9..23a29454e 100644 --- a/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs +++ b/Tests/Contoso.Forms.Test/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Tests/Droid/Properties/AndroidManifest.xml b/Tests/Droid/Properties/AndroidManifest.xml index 6ce469abc..38bf2bfcf 100644 --- a/Tests/Droid/Properties/AndroidManifest.xml +++ b/Tests/Droid/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/Tests/Droid/Properties/AssemblyInfo.cs b/Tests/Droid/Properties/AssemblyInfo.cs index e510f721a..40af6228c 100644 --- a/Tests/Droid/Properties/AssemblyInfo.cs +++ b/Tests/Droid/Properties/AssemblyInfo.cs @@ -17,8 +17,8 @@ // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Tests/Microsoft.Azure.Mobile.Analytics.NET/Properties/AssemblyInfo.cs b/Tests/Microsoft.Azure.Mobile.Analytics.NET/Properties/AssemblyInfo.cs index 27eaa2f31..e562d7596 100644 --- a/Tests/Microsoft.Azure.Mobile.Analytics.NET/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.Azure.Mobile.Analytics.NET/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] [assembly: InternalsVisibleTo("Microsoft.Azure.Mobile.Analytics.Test.Windows")] \ No newline at end of file diff --git a/Tests/Microsoft.Azure.Mobile.Analytics.Test.Windows/Properties/AssemblyInfo.cs b/Tests/Microsoft.Azure.Mobile.Analytics.Test.Windows/Properties/AssemblyInfo.cs index c8c65ec1d..b5d1d38d6 100644 --- a/Tests/Microsoft.Azure.Mobile.Analytics.Test.Windows/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.Azure.Mobile.Analytics.Test.Windows/Properties/AssemblyInfo.cs @@ -16,5 +16,5 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/Tests/Microsoft.Azure.Mobile.NET/Properties/AssemblyInfo.cs b/Tests/Microsoft.Azure.Mobile.NET/Properties/AssemblyInfo.cs index 49972dc86..e5322b301 100644 --- a/Tests/Microsoft.Azure.Mobile.NET/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.Azure.Mobile.NET/Properties/AssemblyInfo.cs @@ -33,8 +33,8 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] [assembly: InternalsVisibleTo("Microsoft.Azure.Mobile.Test.Windows")] [assembly: InternalsVisibleTo("Microsoft.Azure.Mobile.Analytics.Test.Windows")] diff --git a/Tests/Microsoft.Azure.Mobile.Push.NET/Properties/AssemblyInfo.cs b/Tests/Microsoft.Azure.Mobile.Push.NET/Properties/AssemblyInfo.cs index 9f69692a8..fe6d68bc6 100644 --- a/Tests/Microsoft.Azure.Mobile.Push.NET/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.Azure.Mobile.Push.NET/Properties/AssemblyInfo.cs @@ -33,4 +33,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] +[assembly: AssemblyFileVersion("0.14.0.0")] diff --git a/Tests/Microsoft.Azure.Mobile.Push.Test.Windows/Properties/AssemblyInfo.cs b/Tests/Microsoft.Azure.Mobile.Push.Test.Windows/Properties/AssemblyInfo.cs index 0d73df8ff..edba0ca88 100644 --- a/Tests/Microsoft.Azure.Mobile.Push.Test.Windows/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.Azure.Mobile.Push.Test.Windows/Properties/AssemblyInfo.cs @@ -33,4 +33,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] +[assembly: AssemblyFileVersion("0.14.0.0")] diff --git a/Tests/Microsoft.Azure.Mobile.Test.UWP/Package.appxmanifest b/Tests/Microsoft.Azure.Mobile.Test.UWP/Package.appxmanifest index 88f4cd3e5..5dd661cc2 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.UWP/Package.appxmanifest +++ b/Tests/Microsoft.Azure.Mobile.Test.UWP/Package.appxmanifest @@ -7,7 +7,7 @@ + Version="0.14.0.0" /> diff --git a/Tests/Microsoft.Azure.Mobile.Test.UWP/Properties/AssemblyInfo.cs b/Tests/Microsoft.Azure.Mobile.Test.UWP/Properties/AssemblyInfo.cs index f71f3fcad..6a8696797 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.UWP/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.UWP/Properties/AssemblyInfo.cs @@ -14,5 +14,5 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] +[assembly: AssemblyFileVersion("0.14.0.0")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Tests/Microsoft.Azure.Mobile.Test.Windows/Properties/AssemblyInfo.cs b/Tests/Microsoft.Azure.Mobile.Test.Windows/Properties/AssemblyInfo.cs index ee96d93ec..0ab6c6b4a 100644 --- a/Tests/Microsoft.Azure.Mobile.Test.Windows/Properties/AssemblyInfo.cs +++ b/Tests/Microsoft.Azure.Mobile.Test.Windows/Properties/AssemblyInfo.cs @@ -16,5 +16,5 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.13.2.0")] -[assembly: AssemblyInformationalVersion("0.13.2-SNAPSHOT")] +[assembly: AssemblyFileVersion("0.14.0.0")] +[assembly: AssemblyInformationalVersion("0.14.0-SNAPSHOT")] diff --git a/Tests/iOS/Info.plist b/Tests/iOS/Info.plist index 9013b615d..e24b4d62c 100644 --- a/Tests/iOS/Info.plist +++ b/Tests/iOS/Info.plist @@ -9,9 +9,9 @@ CFBundleIdentifier com.contoso.contoso-forms-test CFBundleShortVersionString - 0.13.2 + 0.14.0 CFBundleVersion - 0.13.2 + 0.14.0 LSRequiresIPhoneOS MinimumOSVersion From 80e353a2bb0b1b00fdf040c68573573652d7ca94 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Tue, 11 Jul 2017 13:33:51 -0700 Subject: [PATCH 59/60] Fix get install id in channel --- .../Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs index c3481c8cb..f45b6565b 100644 --- a/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs +++ b/SDK/MobileCenter/Microsoft.Azure.Mobile.Windows.Shared/Channel/Channel.cs @@ -350,7 +350,8 @@ private void TriggerIngestion(State state, IList logs, string batchId) } // If the optional Install ID has no value, default to using empty GUID - var rawInstallId = await MobileCenter.GetInstallIdAsync().ConfigureAwait(false); + // TODO When InstallId will really be async, we should not use Result anymore + var rawInstallId = MobileCenter.GetInstallIdAsync().Result; var installId = rawInstallId.HasValue ? rawInstallId.Value : Guid.Empty; using (var serviceCall = _ingestion.PrepareServiceCall(_appSecret, installId, logs)) { From 7a72de49616fd14a548f20e72f5c27fe23a67154 Mon Sep 17 00:00:00 2001 From: Guillaume Perrot Date: Tue, 11 Jul 2017 16:50:29 -0700 Subject: [PATCH 60/60] Update Android SDK to 0.11.1 --- .../Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml | 2 +- build.cake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml index 2aca1c260..1f99850d8 100644 --- a/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml +++ b/Apps/Contoso.Forms.Puppet/Contoso.Forms.Puppet.Droid/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/build.cake b/build.cake index 1c4312af3..c78d45bd8 100644 --- a/build.cake +++ b/build.cake @@ -53,7 +53,7 @@ var ANDROID_ASSEMBLIES_FOLDER = TEMPORARY_PREFIX + "AndroidAssemblies"; var PCL_ASSEMBLIES_FOLDER = TEMPORARY_PREFIX + "PCLAssemblies"; // Native SDK versions -var ANDROID_SDK_VERSION = "0.11.0"; +var ANDROID_SDK_VERSION = "0.11.1"; var IOS_SDK_VERSION = "0.11.0"; var PLATFORM_PATHS = new PlatformPaths();