diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..0179d22 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,44 @@ +version: 1.0.{build} +pull_requests: + do_not_increment_build_number: true +branches: + only: + - master +image: Visual Studio 2017 +install: +- ps: >- + # Download .NET Core 2.0 Preview 2 SDK and add to PATH + + $urlCurrent = "https://download.microsoft.com/download/F/A/A/FAAE9280-F410-458E-8819-279C5A68EDCF/dotnet-sdk-2.0.0-preview2-006497-win-x64.zip" + + $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = "true" + + $env:DOTNET_CLI_TELEMETRY_OPTOUT = "true" + + $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk" + + mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null + + $tempFileCurrent = [System.IO.Path]::GetTempFileName() + + (New-Object System.Net.WebClient).DownloadFile($urlCurrent, $tempFileCurrent) + + Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory($tempFileCurrent, $env:DOTNET_INSTALL_DIR) + + $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" + + $env:CommitHash = "$env:APPVEYOR_REPO_COMMIT" +cache: '%USERPROFILE%\.nuget\packages' +build_script: +- ps: > + dotnet --version + + dotnet build -v q + + dotnet pack src\EventGridExtension\EventGridExtension.csproj -o ..\..\buildoutput --no-build --version-suffix "-$env:APPVEYOR_BUILD_NUMBER" + +artifacts: +- path: buildoutput\*.nupkg + name: Binaries +hosts: + api.nuget.org: 93.184.221.200 diff --git a/src/EventGridExtension/EventGridExtension.csproj b/src/EventGridExtension/EventGridExtension.csproj index 4ae204b..251fbb6 100644 --- a/src/EventGridExtension/EventGridExtension.csproj +++ b/src/EventGridExtension/EventGridExtension.csproj @@ -1,155 +1,18 @@ - - - + - Debug - AnyCPU - {D04DD2A7-EE6B-44C2-B615-DC380D8D2569} - Library - Properties - EventGridExtension - EventGridExtension - v4.6.1 - 512 + netstandard2.0;net461 + Microsoft.Azure.WebJobs.Extensions.EventGrid + - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll - - - ..\..\packages\Microsoft.Azure.WebJobs.Core.2.1.0-beta1\lib\net45\Microsoft.Azure.WebJobs.dll - - - ..\..\packages\Microsoft.Azure.WebJobs.Extensions.2.1.0-beta1\lib\net45\Microsoft.Azure.WebJobs.Extensions.dll - - - ..\..\packages\Microsoft.Azure.WebJobs.2.1.0-beta1\lib\net45\Microsoft.Azure.WebJobs.Host.dll - - - ..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll - - - ..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll - - - ..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll - - - ..\..\packages\Microsoft.Extensions.Logging.Abstractions.1.1.1\lib\netstandard1.1\Microsoft.Extensions.Logging.Abstractions.dll - - - ..\..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll - - - ..\..\packages\WindowsAzure.Storage.7.2.1\lib\net40\Microsoft.WindowsAzure.Storage.dll - - - ..\..\packages\ncrontab.3.3.0\lib\net35\NCrontab.dll - - - ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - - - - ..\..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll - - - - ..\..\packages\System.Console.4.3.0\lib\net46\System.Console.dll - - - - ..\..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - ..\..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll - - - ..\..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll - - - - ..\..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll - - - ..\..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll - - - ..\..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll - - - ..\..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll - True - - - ..\..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll - - - - ..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - - - ..\..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll - - - ..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll - - - ..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll - - - ..\..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll - - - ..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll - - - ..\..\packages\Microsoft.Tpl.Dataflow.4.5.24\lib\portable-net45+win8+wpa81\System.Threading.Tasks.Dataflow.dll - True - - - - - - - - - ..\..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll - + + + + + - - - - - - - - - - - - + + + + - - - - - - \ No newline at end of file + diff --git a/src/EventGridExtension/Properties/AssemblyInfo.cs b/src/EventGridExtension/Properties/AssemblyInfo.cs deleted file mode 100644 index 5667b5a..0000000 --- a/src/EventGridExtension/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("EventGridExtension")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("EventGridExtension")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("d04dd2a7-ee6b-44c2-b615-dc380d8d2569")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/EventGridExtension/packages.config b/src/EventGridExtension/packages.config deleted file mode 100644 index 7ff31ff..0000000 --- a/src/EventGridExtension/packages.config +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/localTests/EventGridBinding.csproj b/test/localTests/EventGridBinding.csproj index 3d67411..a33fcb9 100644 --- a/test/localTests/EventGridBinding.csproj +++ b/test/localTests/EventGridBinding.csproj @@ -1,153 +1,10 @@ - - - + - Debug - AnyCPU - {828D7696-5D52-4AEB-8973-4382E9760094} - Exe - EventGridBinding - EventGridBinding - v4.6.1 - 512 - true - - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + netstandard2.0;net461 + Microsoft.Azure.WebJobs.Extensions.EventGrid.Test + - - ..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll - - - ..\..\packages\Microsoft.Azure.WebJobs.Core.2.1.0-beta1\lib\net45\Microsoft.Azure.WebJobs.dll - - - ..\..\packages\Microsoft.Azure.WebJobs.2.1.0-beta1\lib\net45\Microsoft.Azure.WebJobs.Host.dll - - - ..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll - - - ..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll - - - ..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll - - - ..\..\packages\Microsoft.Extensions.Logging.Abstractions.1.1.1\lib\netstandard1.1\Microsoft.Extensions.Logging.Abstractions.dll - - - ..\..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll - - - ..\..\packages\WindowsAzure.Storage.7.2.1\lib\net40\Microsoft.WindowsAzure.Storage.dll - - - ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - - - - ..\..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll - - - - ..\..\packages\System.Console.4.3.0\lib\net46\System.Console.dll - - - - ..\..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - ..\..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll - - - ..\..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll - - - - ..\..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll - - - ..\..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll - - - ..\..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll - - - ..\..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll - True - - - - ..\..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll - - - - ..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - - - - ..\..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll - - - ..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll - - - ..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll - - - ..\..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll - - - - ..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll - - - - - - - - - ..\..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll - + - - - - - - - - - PreserveNewest - - - - - - {d04dd2a7-ee6b-44c2-b615-dc380d8d2569} - EventGridExtension - - - - \ No newline at end of file + diff --git a/test/localTests/Function.cs b/test/localTests/Function.cs index c247ad9..49f95f0 100644 --- a/test/localTests/Function.cs +++ b/test/localTests/Function.cs @@ -4,14 +4,16 @@ using System.IO; namespace EventGridBinding { - public static class Function + + public class Function { - public static void TestEventGrid([EventGridTrigger] EventGridEvent value) + // TODO test fields + public void TestEventGrid([EventGridTrigger] EventGridEvent value) { Console.WriteLine(value); } - public static void TestInputStream([EventGridTrigger("eventhubcapture")] Stream myBlob, string blobTrigger) + public void TestInputStream([EventGridTrigger("eventhubcapture")] Stream myBlob, string blobTrigger) { Console.WriteLine($"file name {blobTrigger}"); var reader = new StreamReader(myBlob); diff --git a/test/localTests/Program.cs b/test/localTests/Program.cs index a2d962e..7186d60 100644 --- a/test/localTests/Program.cs +++ b/test/localTests/Program.cs @@ -13,10 +13,18 @@ namespace EventGridBinding config.UseDevelopmentSettings(); } - config.UseEventGrid(); + var ext = new EventGridExtensionConfig(); + config.AddExtension(ext); + + //config.TypeLocator = new ; + //config.JobActivator = new ; + + Function prog = new Function(); JobHost host = new JobHost(config); host.RunAndBlock(); + + } } } diff --git a/test/localTests/Properties/AssemblyInfo.cs b/test/localTests/Properties/AssemblyInfo.cs deleted file mode 100644 index e98cf4e..0000000 --- a/test/localTests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("EventGridBinding")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("EventGridBinding")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("828d7696-5d52-4aeb-8973-4382e9760094")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")]