diff --git a/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/.gitignore b/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/.gitignore new file mode 100644 index 0000000..65ef298 --- /dev/null +++ b/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/.gitignore @@ -0,0 +1,65 @@ +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf + +CustomProcessingSample/.vs/CustomProcessingSample/v16/.suo + +CustomProcessingSample/CustomProcessingSample.csproj.user + +CustomProcessingSample/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache + +*.cache + +*.CopyComplete + +CustomProcessingSample/obj/Debug/ + +CustomProcessingSample/bin/Debug/CustomProcessingSample.dll diff --git a/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/CustomProcessingSample/CustomProcessingSample.csproj b/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/CustomProcessingSample/CustomProcessingSample.csproj new file mode 100644 index 0000000..7ab8f4e --- /dev/null +++ b/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/CustomProcessingSample/CustomProcessingSample.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {AC6604D5-C586-469D-A88F-70ED93DD1C12} + Library + Properties + CustomProcessingSample + CustomProcessingSample + v4.6.1 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + False + bin\Debug\WindwardCustomProcessing.dll + + + + + + + + + + Always + + + + + + + \ No newline at end of file diff --git a/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/CustomProcessingSample/CustomProcessingSample.sln b/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/CustomProcessingSample/CustomProcessingSample.sln new file mode 100644 index 0000000..c755899 --- /dev/null +++ b/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/CustomProcessingSample/CustomProcessingSample.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31624.102 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomProcessingSample", "CustomProcessingSample.csproj", "{AC6604D5-C586-469D-A88F-70ED93DD1C12}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AC6604D5-C586-469D-A88F-70ED93DD1C12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC6604D5-C586-469D-A88F-70ED93DD1C12}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC6604D5-C586-469D-A88F-70ED93DD1C12}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC6604D5-C586-469D-A88F-70ED93DD1C12}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B6987CF3-60F8-4D06-9584-E5C2627B732B} + EndGlobalSection +EndGlobal diff --git a/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/CustomProcessingSample/CustomProcessor.cs b/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/CustomProcessingSample/CustomProcessor.cs new file mode 100644 index 0000000..7e9e89a --- /dev/null +++ b/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/CustomProcessingSample/CustomProcessor.cs @@ -0,0 +1,18 @@ + +using System.Threading.Tasks; +using WindwardCustomProcessing; + +namespace CustomProcessingSample +{ + public class CustomProcessor : IDocumentPostProcessor + { + //This is the only method that needs to be defined in the IDocumentPostProcessor. + //You can implement any other helper methods, but this is the method the RESTful engine will call. + public Task Process(CustomDocument document) + { + //Setting the document data to an empty byte array + document.Data = new byte[0]; + return Task.FromResult(document); + } + } +} diff --git a/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/CustomProcessingSample/Properties/AssemblyInfo.cs b/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/CustomProcessingSample/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1434f36 --- /dev/null +++ b/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/CustomProcessingSample/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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("CustomProcessingSample")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CustomProcessingSample")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[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("ac6604d5-c586-469d-a88f-70ed93dd1c12")] + +// 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/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/README.md b/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/README.md new file mode 100644 index 0000000..96a134d --- /dev/null +++ b/RESTful Engine/Plugins/Legacy NET RESTful/Custom Processing Sample/README.md @@ -0,0 +1,26 @@ +# Fluent .NET RESTful Custom Processing Sample +This is a sample project to see how the custom processing works in the Legacy .NET RESTful engine. +In this sample, we are removing the data from the document, so when you get the document after processing, "Data" should be an empty byte array. + +## Usage +1. Clone or download this repository +2. Open the CustomProcessingSample solution in Microsoft Visual Studio +3. Ensure you have the WindwardCustomProcessing.dll file from your .NET RESTful Engine (located in the bin folder) +4. Place the WindwardCustomProcessing.dll in the sample project and add a reference to it in Visual Studio + 1. We have a WindwardCustomProcessing.dll provided by default in the bin/Debug folder for your convinience +5. Build the solution +6. After building the solution navigate to the "obj/Debug" directory for the project, there you will find the "CustomProcessingSample.dll" file. Move this file to your RESTful Engine bin folder: +``` +C:\inetpub\wwwroot\RESTfulEngine\bin +``` +7. Copy the path to the file +8. Next we will add the following to our web.config file for the RESTful engine: +``` + + + +``` +9. Now, start up your RESTful engine and run a report. When you get the report the "Data" will be empty + +## Documentation +You can view a full tutorial on how to accomplish this in our documentation [here](https://fluent.apryse.com/documentation/engine-guide/Fluent%20RESTful%20Engines/NetRESTCustomProc).