Skip to content

Commit

Permalink
Update to .NET Standard 2.1 & .NET Core 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCodeTraveler committed Dec 1, 2019
1 parent b803b6f commit 94b5120
Show file tree
Hide file tree
Showing 84 changed files with 61 additions and 59 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
34 changes: 17 additions & 17 deletions Source/DotNetGraphQL.API/Data/DogImagesData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ namespace DotNetGraphQL.API
{
public static class DogImagesData
{
readonly static Lazy<List<DogImagesModel>> _dogImagesHolder = new Lazy<List<DogImagesModel>>(CreateDogImageList);
readonly static Lazy<IEnumerable<DogImagesModel>> _dogImagesHolder = new Lazy<IEnumerable<DogImagesModel>>(CreateDogImageList);

public static List<DogImagesModel> DogImages => _dogImagesHolder.Value;
public static IEnumerable<DogImagesModel> DogImages => _dogImagesHolder.Value;

static List<DogImagesModel> CreateDogImageList() => new List<DogImagesModel>
static IEnumerable<DogImagesModel> CreateDogImageList()
{
GenerateKirbyModel(),
GenerateWafflesModel(),
GenerateWhiskeyModel(),
GenerateTobyModel(),
GenerateMozzieModel(),
GenerateMiloModel(),
GeneratePiperModel(),
GenerateMagicModel(),
GenerateHermesModel()
};
yield return GenerateKirbyModel();
yield return GenerateWafflesModel();
yield return GenerateWhiskeyModel();
yield return GenerateTobyModel();
yield return GenerateMozzieModel();
yield return GenerateMiloModel();
yield return GeneratePiperModel();
yield return GenerateMagicModel();
yield return GenerateHermesModel();
}

static DogImagesModel GenerateKirbyModel()
{
Expand Down Expand Up @@ -57,7 +57,7 @@ static DogImagesModel GenerateWafflesModel()
"https://scontent-sjc3-1.cdninstagram.com/vp/463d2f790dad456aa7f907fbc5c4f2d5/5E5E4DA2/t51.2885-15/e35/p1080x1080/68904319_153662302373174_5867607915252717949_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=102",
"https://scontent-sjc3-1.cdninstagram.com/vp/6f094e68dcea3ce76025bc9a3aae1d10/5E4B5760/t51.2885-15/e35/p1080x1080/61615381_142948983481771_3906781618639463667_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=107",
"https://scontent-sjc3-1.cdninstagram.com/vp/df20cab484e3fdce8e7b93be068cd955/5E5F68F4/t51.2885-15/e35/p1080x1080/60983676_671182750019423_8627416967785409822_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=111",
"https://scontent-sjc3-1.cdninstagram.com/vp/4a5977fc6da543a3580dc65bec020f72/5E420BE3/t51.2885-15/e35/p1080x1080/60306434_315395119395230_9143171722741474046_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=102",
"https://scontent-sjc3-1.cdninstagram.com/vp/4a5977fc6da543a3580dc65bec020f72/5E420BE3/t51.2885-15/e35/p1080x1080/60306434_315395119395230_9143171722741474046_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com&_nc_cat=102"
};

var breed = "Australian Labradoodle";
Expand All @@ -69,7 +69,7 @@ static DogImagesModel GenerateWafflesModel()

static DogImagesModel GenerateWhiskeyModel()
{
var avatarUrl = "https://scontent-sjc3-1.cdninstagram.com/vp/dec8edaafd32ef4f16ce77c2b65eea32/5E62D3AA/t51.2885-19/s320x320/67436293_862189824165677_126933068328992768_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com";
var avatarUrl = "https://scontent-sjc3-1.cdninstagram.com/vp/d0cc41e4c2f2fad7e41ed5f9462421f4/5E6FDB22/t51.2885-19/s320x320/75487930_545788479570130_7341431923115294720_n.jpg?_nc_ht=scontent-sjc3-1.cdninstagram.com";
var websiteUrl = "https://www.whiskeythegoldendoodle.com/";
var name = "Whiskey";

Expand Down Expand Up @@ -173,7 +173,7 @@ static DogImagesModel GenerateMiloModel()

return new DogImagesModel(avatarUrl, websiteUrl, name, photosList, breed, coatColor);
}

static DogImagesModel GenerateMagicModel()
{
var avatarUrl = "https://lh3.googleusercontent.com/8B2KQsTtG1nraAD8oE6N2wjNbK-EFEiZMOd3aJkg_Dqf_Wf34MRXjbs8VDIn8w7DTTmz16BbhIQ7hfE-5Xkuruj1lPVgOcZxY3hpGbn483jpnrmW-WfAcC5jg1wsFZ02-Pt5x7tUGCDbl7BfrH0zdaBaxOk3uyOs_zUKHExpSRb125oV7IgBhI9WYuyxSPbZsQVlBCh_NP-yb3B34vZx1IE5D4uHkc960c5V00C_AEllgX5rjMBEyRW9KhDt7gfmvYcssP6VwOH_WtY9gpyNaYihYCubRPtJDX_XnS6mOLMaI3n6i2f8dTo6hJEuCAP-wpybOXCwvBIq0QcmJJUorCH8_Z1-bocfwIZjDNfxVoQ9DC2_N2ZlWAT7eBVRnGSlAXTO4gpFZ9Pj2RYgWqmj1I98_3NWMPKMvlR_-DTAAKX4bkptZ86vsx1Z1e_62l7e7f-3XD9Eg8i_6AZzSOTEOvifOY9mZe8I_VXiYriAOujsIs3sdKeCDNuoLU91cVK9ZdnqJG_ppUkkEGC3V_oMTkE2gXvej6Dvl1vBrVXyoyT9jYjJVUzLZVj4kE9oltojy11ssvUzUs0_RZv_MS1h0Yp645NbyeKdNtDRgyoBPTGhsJj8eMtO_ljjmwqjndwv3M7Wm3Vwl7xfJdSLSmyaAYYauieu3uYbXBPRizLg0jkeWJ8ZvjaKQ2UlD4UqQWAukAtrbcgtsKqPgYCAFU8o6HGXS8bx4JLcZY5BG_8SZhcYlWyP=w989-h742-no";
Expand All @@ -193,7 +193,7 @@ static DogImagesModel GenerateMagicModel()

return new DogImagesModel(avatarUrl, websiteUrl, name, photosList, breed, coatColor, birthDate);
}

static DogImagesModel GenerateHermesModel()
{
var avatarUrl = "https://lh3.googleusercontent.com/9kWTrt54igZZj2pEb0y7WVjvosu8PGmT2YFtLg9bTO_-U4NqKkdPZ2i15n2nRCWN-bmyOjFTC4sf0vtK7HqBxLzqzn1_JHn0nptex-GyA7KCfvI2Lli2i1Y5gMbrcaKU_dWTTFxPvcWZEKEiOfGkXYFk8DfWas3uvrGsjE2SQs2dRMndcSttu-SaUuNBDoQROq0IEgnpFx6MS0H5GxlZFCKyDll2CsJfBPYMp2iFBQbKcBNc45Z7UFJDyJx8DxuHT3JYUIabdCFqSKzPXt6ibnlGTs4GFsBA77RIKsivEF2kDT-HXoTGY9M4vxwzgt-6M9-UCjuL-QM_Rci0jyRh08WnpqlkF1MemXIu6kKc7pA-e0gOkVMsoODJ6E1d9Wl95v2bc4FrgJzibHrIyh7LoIKWgV9ImXRXd7i2ZVAiMekbJwRWQUDu9VgvMjBpSW1Qtn6T55_XvA1WZiYamZ33FbDyDzxzYNXwyOAap7U593CDY-b_h2_6IBhVX8tW0WRQgB2igzM7dXtWgIdf2wSfK-7UvWzX9bOfYplIVjXbzxWQF_VYjb6nItW9T7NFXNkx6aipdymb_Cgv-_jbSVfWLYESuMy490DIO_NIvSXqwcAz8r7NOTBvnSp0wYZugdH2v7KKT7v2KZ1_rFi7JTbMof4KFHkFlwQ23aI81VfDls4YRkrikyO1Uf6qUlzJXeOSrAi1BlZXrMcfZJyYmOCDfRUVofMxnTtUiB5Gi9oeswl8-4uX=w509-h382-no";
Expand Down
9 changes: 2 additions & 7 deletions Source/DotNetGraphQL.API/DotNetGraphQL.API.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<LangVersion>8.0</LangVersion>
<TargetFramework>netcoreapp3.0</TargetFramework>
<Nullable>Enable</Nullable>
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GraphQL" Version="3.0.0-preview-1271" />
<PackageReference Include="GraphQL" Version="3.0.0-preview-1352" />
<PackageReference Include="GraphQL.Common" Version="2.0.0-alpha.3" />
<PackageReference Include="Microsoft.AspNetCore.App">
<PrivateAssets Condition="'%(PackageReference.Version)' == ''">all</PrivateAssets>
<Publish Condition="'%(PackageReference.Version)' == ''">true</Publish>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DotNetGraphQL.Common\DotNetGraphQL.Common.csproj">
Expand Down
24 changes: 16 additions & 8 deletions Source/DotNetGraphQL.API/GraphQLMiddleware.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Net;
Expand Down Expand Up @@ -31,8 +32,10 @@ public GraphQLMiddleware(RequestDelegate next, GraphQLSettings settings, IDocume

public Task Invoke(HttpContext context, ISchema schema)
{
if (IsGraphQLRequest(context))
return ExecuteAsync(context, schema);
var (isGraphQLRequest, request) = IsGraphQLRequest(context);

if (isGraphQLRequest && request is GraphQLRequest)
return ExecuteAsync(context, schema, request);

return _next(context);
}
Expand All @@ -45,16 +48,21 @@ static T Deserialize<T>(Stream stream)
return Serializer.Deserialize<T>(jsonTextReader);
}

bool IsGraphQLRequest(HttpContext context)
(bool isGraphQLRequest, GraphQLRequest? request) IsGraphQLRequest(HttpContext context)
{
return context.Request.Path.StartsWithSegments(_settings.Path)
&& context.Request.Method.Equals("POST", StringComparison.OrdinalIgnoreCase);
try
{
return (context.Request.Path.StartsWithSegments(_settings.Path) && context.Request.Method.Equals("POST", StringComparison.OrdinalIgnoreCase),
Deserialize<GraphQLRequest>(context.Request.Body));
}
catch
{
return (false, null);
}
}

async Task ExecuteAsync(HttpContext context, ISchema schema)
async Task ExecuteAsync(HttpContext context, ISchema schema, GraphQLRequest request)
{
var request = Deserialize<GraphQLRequest>(context.Request.Body);

var result = await _executer.ExecuteAsync(options =>
{
options.Schema = schema;
Expand Down
Empty file modified Source/DotNetGraphQL.API/GraphQLSettings.cs
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.API/GraphQLUserContext.cs
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.API/GraphTypes/DogImagesGraphType.cs
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.API/GraphTypes/ImagesGraphType.cs
100644 → 100755
Empty file.
8 changes: 2 additions & 6 deletions Source/DotNetGraphQL.API/InputValidationRule.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
using System.Threading.Tasks;
using GraphQL.Validation;

namespace DotNetGraphQL.Common
{
public class InputValidationRule : IValidationRule
{
public INodeVisitor Validate(ValidationContext context)
{
return new EnterLeaveListener(_ =>
{
});
}
public Task<INodeVisitor> ValidateAsync(ValidationContext context) => Task.FromResult<INodeVisitor>(new EnterLeaveListener());
}
}
Empty file modified Source/DotNetGraphQL.API/Program.cs
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.API/Public/bundle.js
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.API/Public/index.html
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.API/Public/style.css
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.API/Schemas/GraphQLSchema.cs
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.API/Schemas/ImagesQuery.cs
100644 → 100755
Empty file.
10 changes: 7 additions & 3 deletions Source/DotNetGraphQL.API/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace DotNetGraphQL.API
Expand All @@ -13,6 +15,8 @@ public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.Configure<KestrelServerOptions>(options => options.AllowSynchronousIO = true);

services.AddSingleton<IDocumentExecuter, DocumentExecuter>();
services.AddSingleton<IDocumentWriter, DocumentWriter>();

Expand All @@ -26,10 +30,10 @@ public void ConfigureServices(IServiceCollection services)
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
if (env.IsDevelopment())
app.UseDeveloperExceptionPage();
//if (env.IsDevelopment())
// app.UseDeveloperExceptionPage();

app.UseCors("AllowAll");

Expand Down
Empty file modified Source/DotNetGraphQL.API/appsettings.Development.json
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.API/appsettings.json
100644 → 100755
Empty file.
3 changes: 1 addition & 2 deletions Source/DotNetGraphQL.Common/DotNetGraphQL.Common.csproj
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>8.0</LangVersion>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>Enable</Nullable>
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
</PropertyGroup>
Expand Down
Empty file modified Source/DotNetGraphQL.Common/Models/DogImagesModel.cs
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.Common/Models/ImagesModel.cs
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.Mobile.Android/Assets/AboutAssets.txt
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.3.0.947036" />
<PackageReference Include="Xamarin.Forms" Version="4.3.0.991211" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
<PackageReference Include="AsyncAwaitBestPractices.MVVM" Version="3.1.0" />
<PackageReference Include="AsyncAwaitBestPractices.MVVM" Version="4.0.0-pre3" />
<PackageReference Include="Xamarin.FFImageLoading.Forms" Version="2.4.11.982" />
<PackageReference Include="Xam.Plugins.Forms.ImageCircle" Version="3.0.0.5" />
<PackageReference Include="modernhttpclient-updated" Version="3.4.2" />
<PackageReference Include="GraphQL.Client" Version="2.0.0-alpha.3" />
<PackageReference Include="Polly" Version="7.1.1" />
<PackageReference Include="Polly" Version="7.2.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
Expand Down
Empty file modified Source/DotNetGraphQL.Mobile.Android/MainActivity.cs
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.Mobile.Android/Properties/AssemblyInfo.cs
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified Source/DotNetGraphQL.Mobile.Android/Resources/layout/Tabbar.xml
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Source/DotNetGraphQL.Mobile.Android/Resources/values/colors.xml
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.Mobile.Android/Resources/values/styles.xml
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.Mobile.Android/linker.xml
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.Mobile.Android/proguard.cfg
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.Mobile.iOS/AppDelegate.cs
100644 → 100755
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.3.0.947036" />
<PackageReference Include="Xamarin.Forms" Version="4.3.0.991211" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
<PackageReference Include="AsyncAwaitBestPractices.MVVM" Version="3.1.0" />
<PackageReference Include="AsyncAwaitBestPractices.MVVM" Version="4.0.0-pre3" />
<PackageReference Include="Xamarin.FFImageLoading.Forms" Version="2.4.11.982" />
<PackageReference Include="Xam.Plugins.Forms.ImageCircle" Version="3.0.0.5" />
<PackageReference Include="modernhttpclient-updated" Version="3.4.2" />
<PackageReference Include="GraphQL.Client" Version="2.0.0-alpha.3" />
<PackageReference Include="Polly" Version="7.1.1" />
<PackageReference Include="Polly" Version="7.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DotNetGraphQL.Mobile\DotNetGraphQL.Mobile.csproj">
Expand Down
Empty file modified Source/DotNetGraphQL.Mobile.iOS/Entitlements.plist
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.Mobile.iOS/Info.plist
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.Mobile.iOS/Main.cs
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.Mobile.iOS/Properties/AssemblyInfo.cs
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.Mobile.iOS/Resources/[email protected]
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Source/DotNetGraphQL.Mobile.iOS/Resources/Default-Portrait.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified Source/DotNetGraphQL.Mobile.iOS/Resources/[email protected]
100644 → 100755
Empty file modified Source/DotNetGraphQL.Mobile.iOS/Resources/Default.png
100644 → 100755
Empty file modified Source/DotNetGraphQL.Mobile.iOS/Resources/[email protected]
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.Mobile/App.cs
100644 → 100755
Empty file.
Empty file modified Source/DotNetGraphQL.Mobile/Constants/BackendConstants.cs
100644 → 100755
Empty file.
7 changes: 3 additions & 4 deletions Source/DotNetGraphQL.Mobile/DotNetGraphQL.Mobile.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
<TargetFramework>netstandard2.1</TargetFramework>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<Nullable>Enable</Nullable>
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.3.0.947036" />
<PackageReference Include="Xamarin.Forms" Version="4.3.0.991211" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
<PackageReference Include="AsyncAwaitBestPractices.MVVM" Version="3.1.0" />
<PackageReference Include="AsyncAwaitBestPractices.MVVM" Version="4.0.0-pre3" />
<PackageReference Include="Xamarin.FFImageLoading.Forms" Version="2.4.11.982" />
<PackageReference Include="Xam.Plugins.Forms.ImageCircle" Version="3.0.0.5" />
<PackageReference Include="modernhttpclient-updated" Version="3.4.2" />
<PackageReference Include="GraphQL.Client" Version="2.0.0-alpha.3" />
<PackageReference Include="Polly" Version="7.1.1" />
<PackageReference Include="Polly" Version="7.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DotNetGraphQL.Common\DotNetGraphQL.Common.csproj" />
Expand Down
5 changes: 4 additions & 1 deletion Source/DotNetGraphQL.Mobile/Pages/Base/BaseContentPage.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Threading.Tasks;
using Xamarin.Essentials;
using Xamarin.Forms;
Expand All @@ -22,10 +23,12 @@ protected override void OnAppearing()
//If Collection View is Empty, Manually Trigger a Pull-to-Refresh
if (Content is RefreshView refreshView
&& refreshView.Content is CollectionView collectionView
&& !collectionView.ItemsSource.GetEnumerator().MoveNext())
&& IsNullOrEmpty(collectionView.ItemsSource))
{
refreshView.IsRefreshing = true;
}

static bool IsNullOrEmpty(in IEnumerable? enumerable) => !enumerable?.GetEnumerator().MoveNext() ?? true;
}

protected Task OpenBrowser(Uri uri) => Device.InvokeOnMainThreadAsync(() => Browser.OpenAsync(uri));
Expand Down
Empty file modified Source/DotNetGraphQL.Mobile/Pages/Base/BaseNavigationPage.cs
100644 → 100755
Empty file.
3 changes: 1 addition & 2 deletions Source/DotNetGraphQL.Mobile/Pages/ImageListPage.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Linq;
using DotNetGraphQL.Common;
using Xamarin.Forms;

Expand Down
2 changes: 1 addition & 1 deletion Source/DotNetGraphQL.Mobile/Services/GraphQLService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static async Task<GraphQLResponse> AttemptAndRetry(Func<Task<GraphQLResponse>> a

return response;

TimeSpan pollyRetryAttempt(int attemptNumber) => TimeSpan.FromSeconds(Math.Pow(2, attemptNumber));
static TimeSpan pollyRetryAttempt(int attemptNumber) => TimeSpan.FromSeconds(Math.Pow(2, attemptNumber));
}
}
}
3 changes: 1 addition & 2 deletions Source/DotNetGraphQL.Mobile/ViewModels/ImageListViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Threading.Tasks;
using AsyncAwaitBestPractices;
using AsyncAwaitBestPractices.MVVM;
Expand All @@ -27,7 +26,7 @@ public event EventHandler<string> PullToRefreshFailed
}

public ObservableCollection<DogImagesModel> DogImageCollection { get; } = new ObservableCollection<DogImagesModel>();
public AsyncCommand RefreshDogCollectionCommand { get; }
public IAsyncCommand RefreshDogCollectionCommand { get; }

public bool IsDogImageCollectionRefreshing
{
Expand Down
Empty file.
Empty file modified Source/DotNetGraphQL.sln
100644 → 100755
Empty file.

0 comments on commit 94b5120

Please sign in to comment.