Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
david-driscoll committed Mar 4, 2021
1 parent 132ddc1 commit 750f142
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 14 deletions.
3 changes: 2 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
<PackageVersion Include="Rocket.Surgery.Conventions" Version="10.1.1" />
<PackageVersion Include="Rocket.Surgery.Conventions.Abstractions" Version="10.1.1" />
<PackageVersion Include="Rocket.Surgery.Conventions.Attributes" Version="10.1.1" />
<PackageVersion Include="Rocket.Surgery.Conventions.DependencyModel" Version="10.1.1" />
<PackageVersion Include="Rocket.Surgery.Hosting.TestHost" Version="10.1.1" />
<PackageVersion Include="Rocket.Surgery.Extensions.Configuration" Version="11.1.0" />
<PackageVersion Include="Rocket.Surgery.Extensions.Configuration.Json" Version="11.1.0" />
Expand Down Expand Up @@ -129,4 +130,4 @@
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.3" />
</ItemGroup>
<Import Project="$(MSBuildThisFileDirectory)/Directory.Packages.support.props" Condition="Exists('$(MSBuildThisFileDirectory)/Directory.Packages.support.props')" />
</Project>
</Project>
13 changes: 1 addition & 12 deletions src/Functions/LaunchPadFunctionStartup.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
using App.Metrics;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Reflection;
using Microsoft.Azure.Functions.Extensions.DependencyInjection;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Rocket.Surgery.Conventions;
using Rocket.Surgery.Conventions.DependencyInjection;
using Rocket.Surgery.Conventions.Reflection;
using Serilog;
using Serilog.Extensions.Logging;
using ILogger = Serilog.ILogger;

namespace Rocket.Surgery.LaunchPad.Functions
{
Expand Down Expand Up @@ -55,7 +44,7 @@ protected LaunchPadFunctionStartup()
// }
}

protected LaunchPadFunctionStartup(Func<LaunchPadFunctionStartup, ConventionContextBuilder> configure) : this()
protected LaunchPadFunctionStartup(Func<LaunchPadFunctionStartup, ConventionContextBuilder> configure)
{
_builder = configure(this).Set(HostType.Live);
if (this is IConvention convention)
Expand Down
16 changes: 16 additions & 0 deletions src/Functions/RocketBooster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.Azure.Functions.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.DependencyModel;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Rocket.Surgery.Conventions;
Expand Down Expand Up @@ -51,6 +52,21 @@ public static Func<LaunchPadFunctionStartup, ConventionContextBuilder> ForAssemb
/// <returns>Func&lt;IHostBuilder, ConventionContextBuilder&gt;.</returns>
public static Func<LaunchPadFunctionStartup, ConventionContextBuilder> For(IEnumerable<Assembly> assemblies) => ForAssemblies(assemblies);

// /// <summary>
// /// Use the given dependency context for resolving assemblies
// /// </summary>
// /// <param name="dependencyContext"></param>
// /// <returns></returns>
// public static Func<LaunchPadFunctionStartup, ConventionContextBuilder> ForDependencyContext(DependencyContext dependencyContext)
// => builder => new ConventionContextBuilder(new Dictionary<object, object?>()).UseDependencyContext(dependencyContext);
//
// /// <summary>
// /// Use the given dependency context for resolving assemblies
// /// </summary>
// /// <param name="dependencyContext"></param>
// /// <returns></returns>
// public static Func<LaunchPadFunctionStartup, ConventionContextBuilder> For(DependencyContext dependencyContext) => ForDependencyContext(dependencyContext);

/// <summary>
/// Uses the assembly candidate finder.
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions src/HotChocolate/AutoConfigureMediatRMutation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public class AutoConfigureMediatRMutation : ConfigureGraphqlRootTypeBase
public AutoConfigureMediatRMutation(IEnumerable<Type> mediatorRequestTypes) : base(OperationType.Mutation)
{
_mediatorRequestTypes = mediatorRequestTypes;
Console.WriteLine(nameof(AutoConfigureMediatRMutation));
foreach (var type in _mediatorRequestTypes)
Console.WriteLine(type.FullName);
}

public override void Configure(IObjectTypeDescriptor descriptor)
Expand Down
2 changes: 1 addition & 1 deletion src/HotChocolate/Conventions/GraphqlConvention.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
[assembly: Convention(typeof(GraphqlConvention))]
namespace Rocket.Surgery.LaunchPad.HotChocolate.Conventions
{
[BeforeConvention(typeof(HotChocolateConvention))]
public class GraphqlConvention : IServiceConvention
{
private readonly IFairyBreadOptions _options;
Expand All @@ -40,7 +41,6 @@ public void Register(IConventionContext context, IConfiguration configuration, I
.AddGraphQL()
.UseField<CustomInputValidationMiddleware>()
.AddErrorFilter<GraphqlErrorFilter>()
.ConfigureSchema(sb => sb.AddNodaTime())
;
}
}
Expand Down

0 comments on commit 750f142

Please sign in to comment.