Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2020-10-25 17:23:54 +00:00 коммит произвёл GitHub
Родитель 3b5b760f41
Коммит 3ec6acb330
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 18 добавлений и 18 удалений

Просмотреть файл

@ -390,7 +390,7 @@ namespace Xamarin.Forms.Core.UnitTests
public async Task PoppingSamePageSetsCorrectNavigationSource() public async Task PoppingSamePageSetsCorrectNavigationSource()
{ {
Routing.RegisterRoute("detailspage", typeof(ContentPage)); Routing.RegisterRoute("detailspage", typeof(ContentPage));
var shell = new TestShell(CreateShellItem(shellItemRoute:"item1")); var shell = new TestShell(CreateShellItem(shellItemRoute: "item1"));
await shell.GoToAsync("detailspage/detailspage"); await shell.GoToAsync("detailspage/detailspage");
await shell.Navigation.PopAsync(); await shell.Navigation.PopAsync();
@ -471,7 +471,7 @@ namespace Xamarin.Forms.Core.UnitTests
public async Task ChangingShellSectionSetsCorrectNavigationSource() public async Task ChangingShellSectionSetsCorrectNavigationSource()
{ {
var shell = new TestShell( var shell = new TestShell(
CreateShellItem(shellSectionRoute:"item1") CreateShellItem(shellSectionRoute: "item1")
); );
shell.Items[0].Items.Add(CreateShellSection(shellContentRoute: "item2")); shell.Items[0].Items.Add(CreateShellSection(shellContentRoute: "item2"));
@ -486,7 +486,7 @@ namespace Xamarin.Forms.Core.UnitTests
public async Task ChangingShellContentSetsCorrectNavigationSource() public async Task ChangingShellContentSetsCorrectNavigationSource()
{ {
var shell = new TestShell( var shell = new TestShell(
CreateShellItem(shellContentRoute:"item1") CreateShellItem(shellContentRoute: "item1")
); );
shell.Items[0].Items[0].Items.Add(CreateShellContent(shellContentRoute: "item2")); shell.Items[0].Items[0].Items.Add(CreateShellContent(shellContentRoute: "item2"));

Просмотреть файл

@ -260,7 +260,7 @@ namespace Xamarin.Forms.Core.UnitTests
[Test] [Test]
public async Task NavigatingBackAbsolutelyClearsParametersFromPreviousPage() public async Task NavigatingBackAbsolutelyClearsParametersFromPreviousPage()
{ {
var shell = new TestShell(CreateShellItem(shellItemRoute:"item")); var shell = new TestShell(CreateShellItem(shellItemRoute: "item"));
Routing.RegisterRoute("details", typeof(ShellTestPage)); Routing.RegisterRoute("details", typeof(ShellTestPage));

Просмотреть файл

@ -142,7 +142,7 @@ namespace Xamarin.Forms.Core.UITests
public void DragAndDrop(string from, string to) public void DragAndDrop(string from, string to)
{ {
DragAndDrop( DragAndDrop(
FindFirstElement(WinQuery.FromMarked(from)), FindFirstElement(WinQuery.FromMarked(from)),
FindFirstElement(WinQuery.FromMarked(to)) FindFirstElement(WinQuery.FromMarked(to))
); );
} }

Просмотреть файл

@ -276,7 +276,7 @@ namespace Xamarin.Forms
if (basis.IsAuto) if (basis.IsAuto)
return "auto"; return "auto";
if (basis.IsRelative) if (basis.IsRelative)
return $"{basis.Length*100}%"; return $"{basis.Length * 100}%";
return $"{basis.Length}"; return $"{basis.Length}";
} }
} }

Просмотреть файл

@ -29,5 +29,5 @@ namespace Xamarin.Forms
return $"{r.X}, {r.Y}, {r.Width}, {r.Height}"; return $"{r.X}, {r.Y}, {r.Width}, {r.Height}";
} }
} }
} }

Просмотреть файл

@ -659,13 +659,13 @@ namespace Xamarin.Forms
filteredQuery.Add(key, q.Value); filteredQuery.Add(key, q.Value);
} }
if (baseShellItem is ShellContent) if (baseShellItem is ShellContent)
baseShellItem.ApplyQueryAttributes(MergeData(element, filteredQuery, isPopping)); baseShellItem.ApplyQueryAttributes(MergeData(element, filteredQuery, isPopping));
else if (isLastItem) else if (isLastItem)
element.SetValue(ShellContent.QueryAttributesProperty, MergeData(element, query, isPopping)); element.SetValue(ShellContent.QueryAttributesProperty, MergeData(element, query, isPopping));
IDictionary<string,string> MergeData(Element shellElement, IDictionary<string, string> data, bool isPopping) IDictionary<string, string> MergeData(Element shellElement, IDictionary<string, string> data, bool isPopping)
{ {
if (!isPopping) if (!isPopping)
return data; return data;
@ -677,7 +677,7 @@ namespace Xamarin.Forms
if (existing == null) if (existing == null)
return data; return data;
foreach(var datum in existing) foreach (var datum in existing)
{ {
if (!returnValue.ContainsKey(datum.Key)) if (!returnValue.ContainsKey(datum.Key))
returnValue[datum.Key] = datum.Value; returnValue[datum.Key] = datum.Value;
@ -1285,7 +1285,7 @@ namespace Xamarin.Forms
{ {
if (_accumulateNavigatedEvents) if (_accumulateNavigatedEvents)
{ {
if(_accumulatedEvent == null) if (_accumulatedEvent == null)
_accumulatedEvent = args; _accumulatedEvent = args;
} }
else else
@ -1665,7 +1665,7 @@ namespace Xamarin.Forms
var targetUri = ShellUriHandler.ConvertToStandardFormat(this, request.Request.FullUri); var targetUri = ShellUriHandler.ConvertToStandardFormat(this, request.Request.FullUri);
var currentUri = ShellUriHandler.ConvertToStandardFormat(this, current.FullLocation); var currentUri = ShellUriHandler.ConvertToStandardFormat(this, current.FullLocation);
var targetPaths = ShellUriHandler.RetrievePaths(targetUri.PathAndQuery); var targetPaths = ShellUriHandler.RetrievePaths(targetUri.PathAndQuery);
var currentPaths = ShellUriHandler.RetrievePaths(currentUri.PathAndQuery); var currentPaths = ShellUriHandler.RetrievePaths(currentUri.PathAndQuery);
@ -1685,7 +1685,7 @@ namespace Xamarin.Forms
if (targetPathsLength == currentPathsLength) if (targetPathsLength == currentPathsLength)
return ShellNavigationSource.Unknown; return ShellNavigationSource.Unknown;
if(targetPathsLength < currentPathsLength) if (targetPathsLength < currentPathsLength)
{ {
for (var i = 0; i < targetPathsLength; i++) for (var i = 0; i < targetPathsLength; i++)
{ {
@ -1710,7 +1710,7 @@ namespace Xamarin.Forms
return ShellNavigationSource.Pop; return ShellNavigationSource.Pop;
} }
else if(targetPathsLength > currentPathsLength) else if (targetPathsLength > currentPathsLength)
{ {
for (var i = 0; i < currentPathsLength; i++) for (var i = 0; i < currentPathsLength; i++)
{ {

Просмотреть файл

@ -358,7 +358,7 @@ namespace Xamarin.Forms
await Navigation.PushModalAsync(page, IsNavigationAnimated(page)); await Navigation.PushModalAsync(page, IsNavigationAnimated(page));
break; break;
} }
else if(!isLast && navIndex < _navStack.Count) else if (!isLast && navIndex < _navStack.Count)
{ {
Navigation.InsertPageBefore(page, _navStack[navIndex]); Navigation.InsertPageBefore(page, _navStack[navIndex]);
} }

Просмотреть файл

@ -1,10 +1,10 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using System.Reflection; using System.Reflection;
using Xamarin.Forms.Internals; using Xamarin.Forms.Internals;
using Xamarin.Forms.Xaml; using Xamarin.Forms.Xaml;
using System.Linq;
namespace Xamarin.Forms namespace Xamarin.Forms
{ {

Просмотреть файл

@ -85,7 +85,7 @@ namespace Xamarin.Forms.Platform.Android
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public override void OnReceivedError(WView view, ClientError errorCode, string description, string failingUrl) public override void OnReceivedError(WView view, ClientError errorCode, string description, string failingUrl)
{ {
if(failingUrl == _renderer?.Control.Url) if (failingUrl == _renderer?.Control.Url)
{ {
_navigationResult = WebNavigationResult.Failure; _navigationResult = WebNavigationResult.Failure;
if (errorCode == ClientError.Timeout) if (errorCode == ClientError.Timeout)
@ -98,7 +98,7 @@ namespace Xamarin.Forms.Platform.Android
public override void OnReceivedError(WView view, IWebResourceRequest request, WebResourceError error) public override void OnReceivedError(WView view, IWebResourceRequest request, WebResourceError error)
{ {
if(request.Url.ToString() == _renderer?.Control.Url) if (request.Url.ToString() == _renderer?.Control.Url)
{ {
_navigationResult = WebNavigationResult.Failure; _navigationResult = WebNavigationResult.Failure;
if (error.ErrorCode == ClientError.Timeout) if (error.ErrorCode == ClientError.Timeout)