summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-04-12 19:49:12 (GMT)
committerJason Smith <jason.smith@xamarin.com>2016-04-12 19:51:53 (GMT)
commitbaa5e82a075764305cab730d9483942c763a7f36 (patch)
tree34463d57e8d773262ad632dff122429181191066
parentb42460c2c32a5b24a3f344121876534e61399140 (diff)
downloadxamarin-forms-baa5e82a075764305cab730d9483942c763a7f36.zip
xamarin-forms-baa5e82a075764305cab730d9483942c763a7f36.tar.gz
xamarin-forms-baa5e82a075764305cab730d9483942c763a7f36.tar.bz2
Make sure pragma warning restores only restore what they are supposed to
-rw-r--r--Xamarin.Forms.Core/Label.cs16
-rw-r--r--Xamarin.Forms.Core/VisualElement.cs6
2 files changed, 11 insertions, 11 deletions
diff --git a/Xamarin.Forms.Core/Label.cs b/Xamarin.Forms.Core/Label.cs
index d34f117..1efbd66 100644
--- a/Xamarin.Forms.Core/Label.cs
+++ b/Xamarin.Forms.Core/Label.cs
@@ -178,13 +178,13 @@ namespace Xamarin.Forms
{
#pragma warning disable 0618 // retain until Font removed
label.Font = Font.OfSize(family, (double)values[1]).WithAttributes(attributes);
-#pragma warning restore
+#pragma warning restore 0618
}
else
{
#pragma warning disable 0618 // retain until Font removed
label.Font = Font.SystemFontOfSize((double)values[1], attributes);
-#pragma warning restore
+#pragma warning restore 0618
}
label._cancelEvents = false;
@@ -207,13 +207,13 @@ namespace Xamarin.Forms
{
#pragma warning disable 0618 // retain until Font removed
label.Font = Font.OfSize(family, (double)values[0]).WithAttributes((FontAttributes)values[1]);
-#pragma warning restore
+#pragma warning restore 0618
}
else
{
#pragma warning disable 0618 // retain until Font removed
label.Font = Font.SystemFontOfSize((double)values[0], (FontAttributes)values[1]);
-#pragma warning restore
+#pragma warning restore 0618
}
label._cancelEvents = false;
@@ -236,13 +236,13 @@ namespace Xamarin.Forms
{
#pragma warning disable 0618 // retain until Font removed
label.Font = Font.OfSize(family, size).WithAttributes((FontAttributes)values[1]);
-#pragma warning restore
+#pragma warning restore 0618
}
else
{
#pragma warning disable 0618 // retain until Font removed
label.Font = Font.SystemFontOfSize(size, (FontAttributes)values[1]);
-#pragma warning restore
+#pragma warning restore 0618
}
label._cancelEvents = false;
@@ -260,7 +260,7 @@ namespace Xamarin.Forms
var label = (Label)bindable;
#pragma warning disable 0618 // retain until XAlign removed
label.OnPropertyChanged(nameof(XAlign));
-#pragma warning restore
+#pragma warning restore 0618
}
static void OnTextPropertyChanged(BindableObject bindable, object oldvalue, object newvalue)
@@ -280,7 +280,7 @@ namespace Xamarin.Forms
var label = (Label)bindable;
#pragma warning disable 0618 // retain until YAlign removed
label.OnPropertyChanged(nameof(YAlign));
-#pragma warning restore
+#pragma warning restore 0618
}
}
} \ No newline at end of file
diff --git a/Xamarin.Forms.Core/VisualElement.cs b/Xamarin.Forms.Core/VisualElement.cs
index c85b379..05caf2f 100644
--- a/Xamarin.Forms.Core/VisualElement.cs
+++ b/Xamarin.Forms.Core/VisualElement.cs
@@ -513,7 +513,7 @@ namespace Xamarin.Forms
{
#pragma warning disable 0618 // retain until GetSizeRequest removed
SizeRequest result = GetSizeRequest(widthConstraint, heightConstraint);
-#pragma warning restore
+#pragma warning restore 0618
if ((flags & MeasureFlags.IncludeMargins) != 0)
{
@@ -581,7 +581,7 @@ namespace Xamarin.Forms
{
#pragma warning disable 0618 // retain until OnSizeRequest removed
return OnSizeRequest(widthConstraint, heightConstraint);
-#pragma warning restore
+#pragma warning restore 0618
}
protected override void OnParentSet()
@@ -597,7 +597,7 @@ namespace Xamarin.Forms
{
NavigationProxy.Inner = null;
}
-#pragma warning restore
+#pragma warning restore 0618
}
protected virtual void OnSizeAllocated(double width, double height)