Skip to content

Commit

Permalink
clear out local project references
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheumann committed Nov 1, 2023
1 parent 30087a7 commit 0e6db42
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 60 deletions.
28 changes: 11 additions & 17 deletions ExampleFunctions/Lots/dependencies/Lots.Dependencies.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<ProjectReference Include="..\..\Elements\Elements\src\Elements.csproj" />
<ProjectReference Include="..\..\Hypar\Hypar.Functions\src\Hypar.Functions.csproj" />
</ItemGroup>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\Elements.Triangulation\Elements.Triangulation.csproj" />
</ItemGroup>

<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="Hypar.Elements" Version="2.1.0"/>
<PackageReference Include="Hypar.Functions" Version="1.10.0"/>
<PackageReference Include="Elements.Triangulation" Version="1.0.2"/>
</ItemGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
6 changes: 3 additions & 3 deletions ExampleFunctions/Lots/dependencies/LotsInputs.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ namespace Lots

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")]

public class LotsInputs : S3Args
public class LotsInputs : ArgsBase

{
[Newtonsoft.Json.JsonConstructor]

public LotsInputs(Overrides @overrides, string bucketName, string uploadsBucket, Dictionary<string, string> modelInputKeys, string gltfKey, string elementsKey, string ifcKey):
base(bucketName, uploadsBucket, modelInputKeys, gltfKey, elementsKey, ifcKey)
public LotsInputs(Overrides @overrides, Dictionary<string, string> modelInputKeys, string gltfKey, string elementsKey, string ifcKey):
base(modelInputKeys, gltfKey, elementsKey, ifcKey)
{
var validator = Validator.Instance.GetFirstValidatorForType<LotsInputs>();
if(validator != null)
Expand Down
3 changes: 0 additions & 3 deletions ExampleFunctions/Lots/dependencies/LotsOutputs.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,13 @@ namespace Lots
public class LotsOutputs: SystemResults
{


/// <summary>
/// Construct a LotsOutputs with default inputs.
/// This should be used for testing only.
/// </summary>
public LotsOutputs() : base()
{

}


}
}
2 changes: 1 addition & 1 deletion ExampleFunctions/Lots/dependencies/Site.QuickAdd.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public partial class Site
public string AddId { get; set; }

/// <summary>
/// Set all properties of the element. Auto-generated from the schema.
/// Determine whether the provided identity is a match for this object. Auto-generated from the schema.
/// ⚠️ Do not edit this method: it will be overwritten automatically next
/// time you run 'hypar init'.
/// </summary>
Expand Down
17 changes: 5 additions & 12 deletions ExampleFunctions/Lots/src/Function.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Edits to this code will be overwritten the next time you run 'hypar init'.
// DO NOT EDIT THIS FILE.

using Amazon;
using Amazon.Lambda.Core;
using Hypar.Functions.Execution;
using Hypar.Functions.Execution.AWS;
Expand All @@ -19,9 +18,9 @@ public class Function
{
// Cache the model store for use by subsequent
// executions of this lambda.
private IModelStore<LotsInputs> store;
private UrlModelStore<LotsInputs> store;

public async Task<LotsOutputs> Handler(LotsInputs args, ILambdaContext context)
public async Task<LotsOutputs> Handler(LotsInputs args)
{
// Preload dependencies (if they exist),
// so that they are available during model deserialization.
Expand Down Expand Up @@ -61,16 +60,10 @@ public async Task<LotsOutputs> Handler(LotsInputs args, ILambdaContext context)
Console.WriteLine($"Time to load assemblies: {sw.Elapsed.TotalSeconds})");

if(this.store == null)
{
if (args.SignedResourceUrls == null)
{
this.store = new S3ModelStore<LotsInputs>(RegionEndpoint.GetBySystemName("us-west-1"));
}
else
{
this.store = new UrlModelStore<LotsInputs>();
}
{
this.store = new UrlModelStore<LotsInputs>();
}


var l = new InvocationWrapper<LotsInputs,LotsOutputs> (store, Lots.Execute);
var output = await l.InvokeAsync(args);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<ProjectReference Include="..\..\Elements\Elements\src\Elements.csproj" />
<ProjectReference Include="..\..\Hypar\Hypar.Functions\src\Hypar.Functions.csproj" />
</ItemGroup>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Hypar.Elements" Version="2.1.0" />
<PackageReference Include="Hypar.Functions" Version="1.10.0" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions ExampleFunctions/Precincts/dependencies/PrecinctsInputs.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ namespace Precincts

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")]

public class PrecinctsInputs : S3Args
public class PrecinctsInputs : ArgsBase

{
[Newtonsoft.Json.JsonConstructor]

public PrecinctsInputs(Overrides @overrides, string bucketName, string uploadsBucket, Dictionary<string, string> modelInputKeys, string gltfKey, string elementsKey, string ifcKey):
base(bucketName, uploadsBucket, modelInputKeys, gltfKey, elementsKey, ifcKey)
public PrecinctsInputs(Overrides @overrides, Dictionary<string, string> modelInputKeys, string gltfKey, string elementsKey, string ifcKey):
base(modelInputKeys, gltfKey, elementsKey, ifcKey)
{
var validator = Validator.Instance.GetFirstValidatorForType<PrecinctsInputs>();
if(validator != null)
Expand Down
3 changes: 0 additions & 3 deletions ExampleFunctions/Precincts/dependencies/PrecinctsOutputs.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,13 @@ namespace Precincts
public class PrecinctsOutputs: SystemResults
{


/// <summary>
/// Construct a PrecinctsOutputs with default inputs.
/// This should be used for testing only.
/// </summary>
public PrecinctsOutputs() : base()
{

}


}
}
2 changes: 1 addition & 1 deletion ExampleFunctions/Precincts/dependencies/Site.QuickAdd.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public partial class Site
public string AddId { get; set; }

/// <summary>
/// Set all properties of the element. Auto-generated from the schema.
/// Determine whether the provided identity is a match for this object. Auto-generated from the schema.
/// ⚠️ Do not edit this method: it will be overwritten automatically next
/// time you run 'hypar init'.
/// </summary>
Expand Down
17 changes: 5 additions & 12 deletions ExampleFunctions/Precincts/src/Function.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Edits to this code will be overwritten the next time you run 'hypar init'.
// DO NOT EDIT THIS FILE.

using Amazon;
using Amazon.Lambda.Core;
using Hypar.Functions.Execution;
using Hypar.Functions.Execution.AWS;
Expand All @@ -19,9 +18,9 @@ public class Function
{
// Cache the model store for use by subsequent
// executions of this lambda.
private IModelStore<PrecinctsInputs> store;
private UrlModelStore<PrecinctsInputs> store;

public async Task<PrecinctsOutputs> Handler(PrecinctsInputs args, ILambdaContext context)
public async Task<PrecinctsOutputs> Handler(PrecinctsInputs args)
{
// Preload dependencies (if they exist),
// so that they are available during model deserialization.
Expand Down Expand Up @@ -61,16 +60,10 @@ public async Task<PrecinctsOutputs> Handler(PrecinctsInputs args, ILambdaContext
Console.WriteLine($"Time to load assemblies: {sw.Elapsed.TotalSeconds})");

if(this.store == null)
{
if (args.SignedResourceUrls == null)
{
this.store = new S3ModelStore<PrecinctsInputs>(RegionEndpoint.GetBySystemName("us-west-1"));
}
else
{
this.store = new UrlModelStore<PrecinctsInputs>();
}
{
this.store = new UrlModelStore<PrecinctsInputs>();
}


var l = new InvocationWrapper<PrecinctsInputs,PrecinctsOutputs> (store, Precincts.Execute);
var output = await l.InvokeAsync(args);
Expand Down

0 comments on commit 0e6db42

Please sign in to comment.