NAF Web Service - acrotron-spezvuz/auralization-proto GitHub Wiki

General

NAF Web Service consist of two projects:

  1. NAFLib ( C++, WinSDK 10 )
  2. Auralization.API ( C#, Asp.Net Core 2.1 )

NAFLib

One constant with file name in the NAFLib.cpp file. Region _DEBUG is for developing purpose only. Value of the file name constant will be returned to the caller. That is all functionality. After build, dll will be at the one of the output directories: Debug, Release, x64/Debug, x64/Release in the root folder of the solution.

Auralization.API

Auralization.API has a link to the NAFLib.dll located in the solution root directory ( folder Debug, Release, x64/Debug, x64/Release).

Important !

Inside the Auralization.API project calls to the NAFLib located at Services/NAFService.cs, used DllImport Attribute. In the real NAF library names of the functions can be different. To explore all available functions in the library use dumpbin /exports naflib.dll in the command prompt or vs command prompt. Then change method name Auralization to the right one or use attribute parameter EntryPoint. Example:
[DllImport("NAFLib", CallingConvention = CallingConvention.StdCall, EntryPoint = "@@Auralization@@_0134231")]

Configuration

There are two configuration files in the project, appsettings.json and appsettings.Development.json for production and development respectively. These files contains configuration for logs and CORS. AllowedOrigins is for CORS and it is an array, so you can add as many origins as you want. In production config add an URL of deployed Auralization.SPA app.

Build

Solution configured for dependency build, so when you build API project the NAF project will build too.

Deploy

Build before publishing. Publish Auralization.API by the wizard to an any folder or use command prompt dotnet publish -c Release -o <location> Make a zip archive from the published files. Follow instructions form the Deploy Application to AWS page.

⚠️ **GitHub.com Fallback** ⚠️