summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul DiPietro <paul.dipietro@me.com>2016-04-12 12:30:27 -0700
committerJason Smith <jason.smith@xamarin.com>2016-04-12 12:30:27 -0700
commitb42460c2c32a5b24a3f344121876534e61399140 (patch)
treec65a4dc15ae21c267a2d4ee60d5a40a532be10c5
parent10f6c08ceb89b8b302cb41dd6fe7b1ccf70884ba (diff)
downloadxamarin-forms-b42460c2c32a5b24a3f344121876534e61399140.tar.gz
xamarin-forms-b42460c2c32a5b24a3f344121876534e61399140.tar.bz2
xamarin-forms-b42460c2c32a5b24a3f344121876534e61399140.zip
Enable CS1998 warnings as errors (#65)
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27350.cs2
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31114.cs2
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39821.cs8
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1461.cs2
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1758.cs2
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1875.cs2
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml.cs2
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml.cs4
-rw-r--r--Xamarin.Forms.Controls/ControlGalleryPages/AutomationIDGallery.cs4
-rw-r--r--Xamarin.Forms.Controls/Xamarin.Forms.Controls.csproj6
-rw-r--r--Xamarin.Forms.Core.Android.UITests/Xamarin.Forms.Core.Android.UITests.csproj6
-rw-r--r--Xamarin.Forms.Core.Windows.UITests/Xamarin.Forms.Core.Windows.UITests.csproj4
-rw-r--r--Xamarin.Forms.Core.iOS.UITests/Xamarin.Forms.Core.iOS.UITests.csproj6
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/NavigationPageRenderer.cs4
-rw-r--r--Xamarin.Forms.Platform.Android/Xamarin.Forms.Platform.Android.csproj7
-rw-r--r--Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj16
-rw-r--r--Xamarin.Forms.Platform.WinRT/ListViewRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.WinRT/Platform.cs2
-rw-r--r--Xamarin.Forms.Platform.WinRT/Xamarin.Forms.Platform.WinRT.csproj4
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/EventsConnection.xaml.cs2
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj6
22 files changed, 62 insertions, 33 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27350.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27350.cs
index e4899358..a705fdd0 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27350.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla27350.cs
@@ -30,7 +30,9 @@ namespace Xamarin.Forms.Controls
public ObservableCollection<RecipeGroup> RecipeGroups { get; set; }
+#pragma warning disable 1998 // considered for removal
public async Task LoadRecipesAsync ()
+#pragma warning restore 1998
{
var groups = new ObservableCollection<RecipeGroup> ();
groups.Add (new RecipeGroup { Title = "Teste 1" });
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31114.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31114.cs
index 8f56fdbb..16d4afa4 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31114.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla31114.cs
@@ -377,7 +377,9 @@ namespace Xamarin.Forms.Controls
}
}
+#pragma warning disable 1998 // considered for removal
async void FastCompleteForCmd(object sender)
+#pragma warning restore 1998
{
try
{
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39821.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39821.cs
index ab998d0a..4a3ed1d5 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39821.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39821.cs
@@ -59,7 +59,9 @@ namespace Xamarin.Forms.Controls.Issues
};
}
+#pragma warning disable 1998 // considered for removal
async Task CheckTranslateRunning(BoxView box)
+#pragma warning restore 1998
{
Debug.WriteLine(box.AnimationIsRunning("TranslateTo") ? "Translate is running" : "Translate is not running");
}
@@ -84,18 +86,24 @@ namespace Xamarin.Forms.Controls.Issues
await box.RelRotateTo(360);
}
+#pragma warning disable 1998 // considered for removal
async Task Cancel(BoxView box)
+#pragma warning restore 1998
{
box.AbortAnimation("animate");
box.AbortAnimation("kinetic");
}
+#pragma warning disable 1998 // considered for removal
async Task Animate(BoxView box)
+#pragma warning restore 1998
{
box.Animate("animate", d => d, d => { }, 100, 1);
}
+#pragma warning disable 1998 // considered for removal
async Task Kinetic(BoxView box)
+#pragma warning restore 1998
{
var resultList = new List<Tuple<double, double>>();
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1461.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1461.cs
index 2ad70257..edb66831 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1461.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1461.cs
@@ -278,7 +278,7 @@ namespace Xamarin.Forms.Controls
try {
IsPresented = !IsPresented;
} catch (InvalidOperationException ex) {
- DisplayAlert ("Error", ex.Message, "ok");
+ await DisplayAlert ("Error", ex.Message, "ok");
}
}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1758.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1758.cs
index 7cb392f1..ebd9f649 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1758.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1758.cs
@@ -63,7 +63,7 @@ namespace Xamarin.Forms.Controls
// Comment this delay out to see the bug
// await Task.Delay(500);
- _button.LayoutTo(new Rectangle(100, 100, 100, 100), 1000);
+ await _button.LayoutTo(new Rectangle(100, 100, 100, 100), 1000);
}
}
} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1875.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1875.cs
index 0391ef4d..09e5eca4 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1875.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1875.cs
@@ -92,7 +92,9 @@ namespace Xamarin.Forms.Controls
}
}
+#pragma warning disable 1998 // considered for removal
public async Task LoadData (int start, int numberOfRecords)
+#pragma warning restore 1998
{
IsLoading = true;
for (int counter = 0; counter < numberOfRecords; counter++)
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml.cs
index 54c8e0b3..99b85b73 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2357.xaml.cs
@@ -210,7 +210,9 @@ namespace Xamarin.Forms.Controls
_mainMenuItems = new ObservableCollection<MainMenuItem> (Enumerable.Empty<MainMenuItem> ());
}
+#pragma warning disable 1998 // considered for removal
public async Task InitializeAsync ()
+#pragma warning restore 1998
{
var items = new List<MainMenuItem> ();
items.Add (new MainMenuItem {
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml.cs
index d2f54cd0..04593195 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue3319.xaml.cs
@@ -56,7 +56,9 @@ namespace Xamarin.Forms.Controls
}
+#pragma warning disable 1998 // considered for removal
public async void OnDelete (object sender, EventArgs e)
+#pragma warning restore 1998
{
var mi = ((MenuItem)sender);
if (mi.CommandParameter == null)
@@ -105,7 +107,9 @@ namespace Xamarin.Forms.Controls
}
}
+#pragma warning disable 1998 // considered for removal
public async Task ExecuteFavoritesCommand ()
+#pragma warning restore 1998
{
if (IsBusy)
return;
diff --git a/Xamarin.Forms.Controls/ControlGalleryPages/AutomationIDGallery.cs b/Xamarin.Forms.Controls/ControlGalleryPages/AutomationIDGallery.cs
index c93a9b69..4ba26667 100644
--- a/Xamarin.Forms.Controls/ControlGalleryPages/AutomationIDGallery.cs
+++ b/Xamarin.Forms.Controls/ControlGalleryPages/AutomationIDGallery.cs
@@ -43,7 +43,7 @@ namespace Xamarin.Forms.Controls
var btn = new Button {
AutomationId = "popModal",
Text = "Pop",
- Command = new Command (async () => Navigation.PopModalAsync ())
+ Command = new Command (async () => await Navigation.PopModalAsync ())
};
rootLayout.Children.Add (btn);
rootLayout.Children.Add (new ActivityIndicator { AutomationId = "actHello", IsRunning = true });
@@ -72,7 +72,7 @@ namespace Xamarin.Forms.Controls
var btn = new Button {
AutomationId = "popModal",
Text = "Pop",
- Command = new Command (async () => Navigation.PopModalAsync ())
+ Command = new Command (async () => await Navigation.PopModalAsync ())
};
rootLayout.Children.Add (btn);
rootLayout.Children.Add (new Image { AutomationId = "imgHello", Source = "menuIcon" });
diff --git a/Xamarin.Forms.Controls/Xamarin.Forms.Controls.csproj b/Xamarin.Forms.Controls/Xamarin.Forms.Controls.csproj
index 05a7b5f0..b5dd6af5 100644
--- a/Xamarin.Forms.Controls/Xamarin.Forms.Controls.csproj
+++ b/Xamarin.Forms.Controls/Xamarin.Forms.Controls.csproj
@@ -28,7 +28,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0114;0108;0109;4014;1998;0649;0169;0472;0414;0168;0219;0429</NoWarn>
+ <NoWarn>0114;0108;0109;4014;0649;0169;0472;0414;0168;0219;0429</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -38,7 +38,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0114;0108;0109;4014;1998;0649;0169;0472;0414;0168;0219;0429</NoWarn>
+ <NoWarn>0114;0108;0109;4014;0649;0169;0472;0414;0168;0219;0429</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Turkey|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
@@ -51,7 +51,7 @@
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0114;0108;0109;4014;1998;0649;0169;0472;0414;0168;0219;0429</NoWarn>
+ <NoWarn>0114;0108;0109;4014;0649;0169;0472;0414;0168;0219;0429</NoWarn>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
diff --git a/Xamarin.Forms.Core.Android.UITests/Xamarin.Forms.Core.Android.UITests.csproj b/Xamarin.Forms.Core.Android.UITests/Xamarin.Forms.Core.Android.UITests.csproj
index b1cf1079..19b578e8 100644
--- a/Xamarin.Forms.Core.Android.UITests/Xamarin.Forms.Core.Android.UITests.csproj
+++ b/Xamarin.Forms.Core.Android.UITests/Xamarin.Forms.Core.Android.UITests.csproj
@@ -23,7 +23,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0114;0108;4014;1998;0649;0168;0169;0219</NoWarn>
+ <NoWarn>0114;0108;4014;0649;0168;0169;0219</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -33,7 +33,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0114;0108;4014;1998;0649;0168;0169;0219</NoWarn>
+ <NoWarn>0114;0108;4014;0649;0168;0169;0219</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Turkey|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
@@ -44,7 +44,7 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0114;0108;4014;1998;0649;0168;0169;0219</NoWarn>
+ <NoWarn>0114;0108;4014;0649;0168;0169;0219</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
diff --git a/Xamarin.Forms.Core.Windows.UITests/Xamarin.Forms.Core.Windows.UITests.csproj b/Xamarin.Forms.Core.Windows.UITests/Xamarin.Forms.Core.Windows.UITests.csproj
index 17d6c0e0..cb493ba1 100644
--- a/Xamarin.Forms.Core.Windows.UITests/Xamarin.Forms.Core.Windows.UITests.csproj
+++ b/Xamarin.Forms.Core.Windows.UITests/Xamarin.Forms.Core.Windows.UITests.csproj
@@ -21,7 +21,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0114;0108;4014;1998;0649;0169;0168;0219</NoWarn>
+ <NoWarn>0114;0108;4014;0649;0169;0168;0219</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -31,7 +31,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0114;0108;4014;1998;0649;0169;0168;0219</NoWarn>
+ <NoWarn>0114;0108;4014;0649;0169;0168;0219</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=3.0.5813.39031, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
diff --git a/Xamarin.Forms.Core.iOS.UITests/Xamarin.Forms.Core.iOS.UITests.csproj b/Xamarin.Forms.Core.iOS.UITests/Xamarin.Forms.Core.iOS.UITests.csproj
index 085c221b..530f3663 100644
--- a/Xamarin.Forms.Core.iOS.UITests/Xamarin.Forms.Core.iOS.UITests.csproj
+++ b/Xamarin.Forms.Core.iOS.UITests/Xamarin.Forms.Core.iOS.UITests.csproj
@@ -23,7 +23,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0114;0108;4014;1998;0649;0169;0168;0219</NoWarn>
+ <NoWarn>0114;0108;4014;0649;0169;0168;0219</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -33,7 +33,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0114;0108;4014;1998;0649;0169;0168;0219</NoWarn>
+ <NoWarn>0114;0108;4014;0649;0169;0168;0219</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Turkey|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
@@ -44,7 +44,7 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0114;0108;4014;1998;0649;0169;0168;0219</NoWarn>
+ <NoWarn>0114;0108;4014;0649;0169;0168;0219</NoWarn>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/NavigationPageRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/NavigationPageRenderer.cs
index 7fd4ed94..b93a0eb9 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/NavigationPageRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/NavigationPageRenderer.cs
@@ -362,7 +362,9 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
UpdateToolbar();
}
- void DeviceInfoPropertyChanged(object sender, PropertyChangedEventArgs e)
+#pragma warning disable 1998 // considered for removal
+ async void DeviceInfoPropertyChanged(object sender, PropertyChangedEventArgs e)
+#pragma warning restore 1998
{
if (nameof(Device.Info.CurrentOrientation) == e.PropertyName)
ResetToolbar();
diff --git a/Xamarin.Forms.Platform.Android/Xamarin.Forms.Platform.Android.csproj b/Xamarin.Forms.Platform.Android/Xamarin.Forms.Platform.Android.csproj
index 2ec3cccb..da51f29a 100644
--- a/Xamarin.Forms.Platform.Android/Xamarin.Forms.Platform.Android.csproj
+++ b/Xamarin.Forms.Platform.Android/Xamarin.Forms.Platform.Android.csproj
@@ -28,8 +28,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>
- </NoWarn>
+ <NoWarn>0642;0114;0108;0672;0168;0169;0184;0649;0414</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -39,7 +38,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0642;0114;0108;0672;0168;0169;0184;0649;1998;0414</NoWarn>
+ <NoWarn>0642;0114;0108;0672;0168;0169;0184;0649;0414</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Turkey|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
@@ -51,7 +50,7 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0642;0114;0108;0672;0168;0169;0184;0649;1998;0414</NoWarn>
+ <NoWarn>0642;0114;0108;0672;0168;0169;0184;0649;0414</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
diff --git a/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj b/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj
index d0781af0..bccb702e 100644
--- a/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj
+++ b/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj
@@ -27,7 +27,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>1998</NoWarn>
+ <NoWarn></NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -38,14 +38,14 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>1998</NoWarn>
+ <NoWarn></NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<PlatformTarget>ARM</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
- <NoWarn>1998;0649;0169;0067</NoWarn>
+ <NoWarn>0649;0169;0067</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -58,7 +58,7 @@
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
- <NoWarn>1998;0649;0169;0067</NoWarn>
+ <NoWarn>0649;0169;0067</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -71,7 +71,7 @@
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
- <NoWarn>1998;0649;0169;0067</NoWarn>
+ <NoWarn>0649;0169;0067</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -84,7 +84,7 @@
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
- <NoWarn>1998;0649;0169;0067</NoWarn>
+ <NoWarn>0649;0169;0067</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -97,7 +97,7 @@
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
- <NoWarn>1998;0649;0169;0067</NoWarn>
+ <NoWarn>0649;0169;0067</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -110,7 +110,7 @@
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
- <NoWarn>1998;0649;0169;0067</NoWarn>
+ <NoWarn>0649;0169;0067</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
diff --git a/Xamarin.Forms.Platform.WinRT/ListViewRenderer.cs b/Xamarin.Forms.Platform.WinRT/ListViewRenderer.cs
index 05e3f934..bbd101fa 100644
--- a/Xamarin.Forms.Platform.WinRT/ListViewRenderer.cs
+++ b/Xamarin.Forms.Platform.WinRT/ListViewRenderer.cs
@@ -278,7 +278,9 @@ namespace Xamarin.Forms.Platform.WinRT
ScrollTo(til.ListProxy.ProxiedEnumerable, til.ListProxy[0], ScrollToPosition.Start, true, true);
}
+#pragma warning disable 1998 // considered for removal
async void ScrollTo(object group, object item, ScrollToPosition toPosition, bool shouldAnimate, bool includeGroup = false, bool previouslyFailed = false)
+#pragma warning restore 1998
{
ScrollViewer viewer = GetScrollViewer();
if (viewer == null)
diff --git a/Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs b/Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs
index 1e48d7ea..8bcf207f 100644
--- a/Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs
+++ b/Xamarin.Forms.Platform.WinRT/NavigationPageRenderer.cs
@@ -496,7 +496,9 @@ namespace Xamarin.Forms.Platform.WinRT
(this as ITitleProvider).BarForegroundBrush = GetBarForegroundBrush();
}
+#pragma warning disable 1998 // considered for removal
async void UpdateTitleOnParents()
+#pragma warning restore 1998
{
if (Element == null)
return;
diff --git a/Xamarin.Forms.Platform.WinRT/Platform.cs b/Xamarin.Forms.Platform.WinRT/Platform.cs
index 012dd2c4..4d7309d3 100644
--- a/Xamarin.Forms.Platform.WinRT/Platform.cs
+++ b/Xamarin.Forms.Platform.WinRT/Platform.cs
@@ -493,7 +493,9 @@ namespace Xamarin.Forms.Platform.WinRT
return GetCommandBarAsync();
}
+#pragma warning disable 1998 // considered for removal
async Task<CommandBar> GetCommandBarAsync()
+#pragma warning restore 1998
{
#if !WINDOWS_UWP
return _page.BottomAppBar as CommandBar;
diff --git a/Xamarin.Forms.Platform.WinRT/Xamarin.Forms.Platform.WinRT.csproj b/Xamarin.Forms.Platform.WinRT/Xamarin.Forms.Platform.WinRT.csproj
index 34a62fa1..7f41e8ba 100644
--- a/Xamarin.Forms.Platform.WinRT/Xamarin.Forms.Platform.WinRT.csproj
+++ b/Xamarin.Forms.Platform.WinRT/Xamarin.Forms.Platform.WinRT.csproj
@@ -37,7 +37,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>1998</NoWarn>
+ <NoWarn></NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -47,7 +47,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>1998</NoWarn>
+ <NoWarn></NoWarn>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
diff --git a/Xamarin.Forms.Xaml.UnitTests/EventsConnection.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/EventsConnection.xaml.cs
index 7bab5676..5727693e 100644
--- a/Xamarin.Forms.Xaml.UnitTests/EventsConnection.xaml.cs
+++ b/Xamarin.Forms.Xaml.UnitTests/EventsConnection.xaml.cs
@@ -64,7 +64,9 @@ namespace Xamarin.Forms.Xaml.UnitTests
}
int asyncPrivateClicked;
+#pragma warning disable 1998 // considered for removal
async void HandleClickedPrivateAsync (object sender, EventArgs e)
+#pragma warning restore 1998
{
asyncPrivateClicked++;
}
diff --git a/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj b/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj
index 226e8bb8..961774f0 100644
--- a/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj
+++ b/Xamarin.Forms.Xaml.UnitTests/Xamarin.Forms.Xaml.UnitTests.csproj
@@ -21,7 +21,7 @@
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0672;1998;0219;0414</NoWarn>
+ <NoWarn>0672;0219;0414</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
@@ -31,7 +31,7 @@
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0672;1998;0219;0414</NoWarn>
+ <NoWarn>0672;0219;0414</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Turkey|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
@@ -44,7 +44,7 @@
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>0672;1998;0219;0414</NoWarn>
+ <NoWarn>0672;0219;0414</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">