diff --git a/ExampleFunctions/Lots/dependencies/Lots.Dependencies.csproj b/ExampleFunctions/Lots/dependencies/Lots.Dependencies.csproj index 9f7c70c..4596ded 100644 --- a/ExampleFunctions/Lots/dependencies/Lots.Dependencies.csproj +++ b/ExampleFunctions/Lots/dependencies/Lots.Dependencies.csproj @@ -1,18 +1,12 @@ - - - - - - - - - net6.0 - enable - enable - - - - - - + + + + + + + + net6.0 + enable + enable + \ No newline at end of file diff --git a/ExampleFunctions/Lots/dependencies/LotsInputs.g.cs b/ExampleFunctions/Lots/dependencies/LotsInputs.g.cs index abf2641..ddaa0a7 100644 --- a/ExampleFunctions/Lots/dependencies/LotsInputs.g.cs +++ b/ExampleFunctions/Lots/dependencies/LotsInputs.g.cs @@ -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 modelInputKeys, string gltfKey, string elementsKey, string ifcKey): - base(bucketName, uploadsBucket, modelInputKeys, gltfKey, elementsKey, ifcKey) + public LotsInputs(Overrides @overrides, Dictionary modelInputKeys, string gltfKey, string elementsKey, string ifcKey): + base(modelInputKeys, gltfKey, elementsKey, ifcKey) { var validator = Validator.Instance.GetFirstValidatorForType(); if(validator != null) diff --git a/ExampleFunctions/Lots/dependencies/LotsOutputs.g.cs b/ExampleFunctions/Lots/dependencies/LotsOutputs.g.cs index e8b340b..9b91de6 100644 --- a/ExampleFunctions/Lots/dependencies/LotsOutputs.g.cs +++ b/ExampleFunctions/Lots/dependencies/LotsOutputs.g.cs @@ -17,16 +17,13 @@ namespace Lots public class LotsOutputs: SystemResults { - /// /// Construct a LotsOutputs with default inputs. /// This should be used for testing only. /// public LotsOutputs() : base() { - } - } } \ No newline at end of file diff --git a/ExampleFunctions/Lots/dependencies/Site.QuickAdd.g.cs b/ExampleFunctions/Lots/dependencies/Site.QuickAdd.g.cs index 0ed5a89..43bbfe4 100644 --- a/ExampleFunctions/Lots/dependencies/Site.QuickAdd.g.cs +++ b/ExampleFunctions/Lots/dependencies/Site.QuickAdd.g.cs @@ -8,7 +8,7 @@ public partial class Site public string AddId { get; set; } /// - /// 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'. /// diff --git a/ExampleFunctions/Lots/src/Function.g.cs b/ExampleFunctions/Lots/src/Function.g.cs index c380edd..e38b87d 100644 --- a/ExampleFunctions/Lots/src/Function.g.cs +++ b/ExampleFunctions/Lots/src/Function.g.cs @@ -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; @@ -19,9 +18,9 @@ public class Function { // Cache the model store for use by subsequent // executions of this lambda. - private IModelStore store; + private UrlModelStore store; - public async Task Handler(LotsInputs args, ILambdaContext context) + public async Task Handler(LotsInputs args) { // Preload dependencies (if they exist), // so that they are available during model deserialization. @@ -61,16 +60,10 @@ public async Task 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(RegionEndpoint.GetBySystemName("us-west-1")); - } - else - { - this.store = new UrlModelStore(); - } + { + this.store = new UrlModelStore(); } + var l = new InvocationWrapper (store, Lots.Execute); var output = await l.InvokeAsync(args); diff --git a/ExampleFunctions/Precincts/dependencies/Precincts.Dependencies.csproj b/ExampleFunctions/Precincts/dependencies/Precincts.Dependencies.csproj index 001813e..a58e7b7 100644 --- a/ExampleFunctions/Precincts/dependencies/Precincts.Dependencies.csproj +++ b/ExampleFunctions/Precincts/dependencies/Precincts.Dependencies.csproj @@ -1,14 +1,14 @@ - - - - - net6.0 enable enable + + + + + diff --git a/ExampleFunctions/Precincts/dependencies/PrecinctsInputs.g.cs b/ExampleFunctions/Precincts/dependencies/PrecinctsInputs.g.cs index e435bfa..cfedeab 100644 --- a/ExampleFunctions/Precincts/dependencies/PrecinctsInputs.g.cs +++ b/ExampleFunctions/Precincts/dependencies/PrecinctsInputs.g.cs @@ -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 modelInputKeys, string gltfKey, string elementsKey, string ifcKey): - base(bucketName, uploadsBucket, modelInputKeys, gltfKey, elementsKey, ifcKey) + public PrecinctsInputs(Overrides @overrides, Dictionary modelInputKeys, string gltfKey, string elementsKey, string ifcKey): + base(modelInputKeys, gltfKey, elementsKey, ifcKey) { var validator = Validator.Instance.GetFirstValidatorForType(); if(validator != null) diff --git a/ExampleFunctions/Precincts/dependencies/PrecinctsOutputs.g.cs b/ExampleFunctions/Precincts/dependencies/PrecinctsOutputs.g.cs index 16092f0..57774f9 100644 --- a/ExampleFunctions/Precincts/dependencies/PrecinctsOutputs.g.cs +++ b/ExampleFunctions/Precincts/dependencies/PrecinctsOutputs.g.cs @@ -17,16 +17,13 @@ namespace Precincts public class PrecinctsOutputs: SystemResults { - /// /// Construct a PrecinctsOutputs with default inputs. /// This should be used for testing only. /// public PrecinctsOutputs() : base() { - } - } } \ No newline at end of file diff --git a/ExampleFunctions/Precincts/dependencies/Site.QuickAdd.g.cs b/ExampleFunctions/Precincts/dependencies/Site.QuickAdd.g.cs index e688ec6..3fd55fa 100644 --- a/ExampleFunctions/Precincts/dependencies/Site.QuickAdd.g.cs +++ b/ExampleFunctions/Precincts/dependencies/Site.QuickAdd.g.cs @@ -8,7 +8,7 @@ public partial class Site public string AddId { get; set; } /// - /// 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'. /// diff --git a/ExampleFunctions/Precincts/src/Function.g.cs b/ExampleFunctions/Precincts/src/Function.g.cs index 63fc113..131c22a 100644 --- a/ExampleFunctions/Precincts/src/Function.g.cs +++ b/ExampleFunctions/Precincts/src/Function.g.cs @@ -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; @@ -19,9 +18,9 @@ public class Function { // Cache the model store for use by subsequent // executions of this lambda. - private IModelStore store; + private UrlModelStore store; - public async Task Handler(PrecinctsInputs args, ILambdaContext context) + public async Task Handler(PrecinctsInputs args) { // Preload dependencies (if they exist), // so that they are available during model deserialization. @@ -61,16 +60,10 @@ public async Task 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(RegionEndpoint.GetBySystemName("us-west-1")); - } - else - { - this.store = new UrlModelStore(); - } + { + this.store = new UrlModelStore(); } + var l = new InvocationWrapper (store, Precincts.Execute); var output = await l.InvokeAsync(args);