Initial commit

parent 452b2d8f
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# Db folder from docker compose
db/
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
.vscode/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# Tye
.tye/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
##
## Visual studio for Mac
##
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# Mac bundle stuff
*.dmg
*.app
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# JetBrains Rider
.idea/
*.sln.iml
##
## Visual Studio Code
##
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<module name="NewGeneration">
<bind name="FactoryObject"
service="RnD.BusinessLayer.Interfaces.Factory.IEventAwareObjectFactory, RnD.BusinessLayer.Interfaces"
to="RnD.BusinessLayer.EF.Factory.EventAwareObjectFactory, RnD.BusinessLayer.EF" />
<bind name="TransactionalFactoryObject"
service="RnD.BusinessLayer.Interfaces.Factory.ITransactionalObjectFactory, RnD.BusinessLayer.Interfaces"
to="RnD.BusinessLayer.EF.Factory.TransactionalObjectFactory, RnD.BusinessLayer.EF" />
<bind name="CustomizationFactory"
service="RnD.ICustomizationObjectFactory, RnD.Customizations.Interfaces"
to="RnD.CustomizationObjectFactory, RnD.Customizations.API" />
<bind name="InterspecBusinessObjectFactory"
service="RnD.BusinessLayer.Interfaces.Interspec.IInterspecBusinessObjectFactory, RnD.BusinessLayer.Interfaces"
to="RnD.Interspec.EF.InterspecBusinessObjectFactory, RnD.Interspec.EF" />
<bind name="FWBBusinessObjectFactory" service="RnD.BusinessLayer.Interfaces.FWB.Factory.IFWBBusinessObjectFactory, RnD.BusinessLayer.Interfaces"
to="RnD.FormulaWorkbench.EF.Factory.FWBBusinessObjectFactory, RnD.FormulaWorkbench.EF"/>
</module>
\ No newline at end of file
using Ninject;
using Ninject.Extensions.Xml;
using Ninject.Modules;
using Ninject.Parameters;
using RnD.BusinessLayer.Interfaces.Factory;
using RnD.Common.Enums;
using RnD.Common.TimeZone;
using System;
using System.IO;
using System.Web;
namespace ProfitGroup.Rdnl.Extensions.Helpers.Api
{
public class ApiInitializer
{
public static IEventAwareObjectFactory InitializeFactory(string aConnectionName, string taskType)
{
var kernel = new StandardKernel(new NinjectSettings()
{
LoadExtensions = false
},
new INinjectModule[1] { new XmlExtensionModule()
});
var configFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"BusinessLayerIoCSupport\serviceLocatorConfiguration.xml");
if (!File.Exists(configFile))
{
throw new FileNotFoundException("Не удалось найти файл конфигурации", configFile);
}
kernel.Load(configFile);
var aEventManagerType = EventManagerType.Synchronous;
var aTask = "";
var aTaskType = taskType; //"scCreate";
var aBrowserGuid = default(Guid);
var aUseDataLanguagePref = NullableBool.Undefined;
string aDataLanguage = null;
string aUserAppLanguagePref = null;
TimeZoneId aClientTimeZoneId = null;
var aIsGsmSession = false;
string aSourceConnectionName = null;
var aDatabaseAccessMode = DatabaseAccessMode.ConfigurationalObjectsFullReadAccess;
return kernel.Get<IEventAwareObjectFactory>(
new ConstructorArgument(nameof(aConnectionName), aConnectionName),
new ConstructorArgument(nameof(aDatabaseAccessMode), aDatabaseAccessMode),
new ConstructorArgument(nameof(aEventManagerType), aEventManagerType),
new ConstructorArgument(nameof(aTask), aTask),
new ConstructorArgument(nameof(aTaskType), aTaskType),
new ConstructorArgument(nameof(aBrowserGuid), aBrowserGuid),
new ConstructorArgument(nameof(aUseDataLanguagePref), aUseDataLanguagePref),
new ConstructorArgument(nameof(aDataLanguage), aDataLanguage),
new ConstructorArgument(nameof(aUserAppLanguagePref), aUserAppLanguagePref),
new ConstructorArgument("aTimeZoneId", aClientTimeZoneId),
new ConstructorArgument(nameof(aIsGsmSession), aIsGsmSession),
new ConstructorArgument(nameof(aSourceConnectionName), aSourceConnectionName));
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CE66275C-0543-46D5-8DF7-0EC58562F408}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ProfitGroup.Rdnl.Extensions</RootNamespace>
<AssemblyName>ProfitGroup.Rdnl.Extensions</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Data.OData, Version=5.6.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLBackEnd\bin\Microsoft.Data.OData.dll</HintPath>
</Reference>
<Reference Include="Ninject, Version=3.3.4.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\Ninject.dll</HintPath>
</Reference>
<Reference Include="Ninject.Extensions.Xml, Version=3.3.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\Ninject.Extensions.Xml.dll</HintPath>
</Reference>
<Reference Include="RDnL.Logger">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RDnL.Logger.dll</HintPath>
</Reference>
<Reference Include="RnD.BusinessLayer.EF">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.BusinessLayer.EF.dll</HintPath>
</Reference>
<Reference Include="RnD.BusinessLayer.Interfaces">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.BusinessLayer.Interfaces.dll</HintPath>
</Reference>
<Reference Include="RnD.Common">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.Common.dll</HintPath>
</Reference>
<Reference Include="RnD.Customizations.API">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.Customizations.API.dll</HintPath>
</Reference>
<Reference Include="RnD.Customizations.Interfaces">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.Customizations.Interfaces.dll</HintPath>
</Reference>
<Reference Include="RnD.FormulaWorkbench.EF">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.FormulaWorkbench.EF.dll</HintPath>
</Reference>
<Reference Include="RnD.Interspec.EF">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLBackEnd\bin\RnD.Interspec.EF.dll</HintPath>
</Reference>
<Reference Include="RnD.Model.EF">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.Model.EF.dll</HintPath>
</Reference>
<Reference Include="RnD.Security">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.Security.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Http.OData, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLBackEnd\bin\System.Web.Http.OData.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Helpers\Api\ApiInitializer.cs" />
<Compile Include="RDnLManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Configs\ServiceLocator.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using System.Reflection;
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("ProfitGroup.Rdnl.Extensions")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ProfitGroup.Rdnl.Extensions")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[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("ce66275c-0543-46d5-8df7-0ec58562f408")]
// 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")]
using ProfitGroup.Rdnl.Extensions.Helpers.Api;
using RnD.API;
using RnD.BusinessLayer.Interfaces.Factory;
namespace ProfitGroup.Rdnl.Extensions
{
public class RDnLManager
{
public IEventAwareObjectFactory EventAwareObjectFactory
{
get => _eventAwareObjectFactory == null || _eventAwareObjectFactory.IsDisposed
? Initialize().EventAwareObjectFactory
: _eventAwareObjectFactory;
private set => _eventAwareObjectFactory = value;
}
private IEventAwareObjectFactory _eventAwareObjectFactory;
private readonly string _connectionName;
private readonly string _taskType;
public RDnLManager(string connectionName, string taskType)
{
_taskType = taskType;
_connectionName = connectionName;
Initialize();
}
public RDnLManager Initialize()
{
EventAwareObjectFactory = ApiInitializer.InitializeFactory(_connectionName, _taskType);
return this;
}
}
}
\ No newline at end of file
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "7.0.11",
"commands": [
"dotnet-ef"
]
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=301879
-->
<configuration>
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
<section name="RnD" type="RnD.Common.Configuration.Sections.RnDSuiteConfigSection, RnD.Common" />
<!-- <section name="eventManagerConfiguration" type="RnD.EventManager.Configuration.EventManagerConfigurationSectionHandler, RnD.EventManager, Version=7.0.0.1, Culture=neutral" /> -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<RnD configProtectionProvider="RnDSuiteProvider">
<EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#">
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc" />
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p" />
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<KeyName>Rsa Key</KeyName>
</KeyInfo>
<CipherData>
<CipherValue>wJ3mjd/fMaF9iNsCND8dTcLOIi3AEqIc/mUg3qL9mCqqBTubEygpESwJu1lHKmCxBnmrlWKatGLAZBBagPGrfLxccqDHtIr2q6S7Cpy+iG1+dQkonl915XM6fHf89++rTfqoiKwRubP/jZDVg4ktm/HccYJxolp4CrfSE8zm0sCyoE5/tX9GWHDGhTsrZzh+V1CIKLGyHpXN6SLqd/p+XE5skRnpjPVwYKV/J4CwxpWgydTSCft6k2pzsd2SAploO+ty0lwCL/FVqeUM7jIAuI4VAEC93cW16kiHN5hJug0tijsp8t5MvRZ5yAUd3/r3Jj5YLLrbTaqCak73J2WBZw==</CipherValue>
</CipherData>
</EncryptedKey>
</KeyInfo>
<CipherData>
<CipherValue>fWjd81lK2ATyuW2KjvZx8kaWx8RlPtJGTTlQgsM0eG5esbcXB8CIC49nYK6GHzeLH0jFXbRWVrrL4vv926VrSG4P7y9FZU7OzdfQHxnj7i+DOzu7RXgNCcPzDZcyhde5OHxxrGJ+LFtL4B3+2/MiKDfJibvn7jtyPqoDy1POXmoTj6F14WLDu1aN0YJWVUY6WOpqchJmyAejYF0sjQNq8ySw0KjCl0vkYkwmaj+PQC9QYPANZ4GMjc542zwSSWGLMHqkfL1+tFFkTWHPi2pe1raGvpZBGxwfoy4sbCZJjYOPfTqpH6LzbZOz1G24GAR5gewip1LVfi4BcdHM5WbyM23KHiftB8Ljiy6mOZEZy6emsdxP8gCno7uGMzJRDXY78Bh2gqjipOgxyAyuTLspRJTTnm00DpF2a9Z/6eYd78W8B3yMgmnTybWa9MVYWMXS</CipherValue>
</CipherData>
</EncryptedData>
</RnD>
<configProtectedData>
<providers>
<add name="RnDSuiteProvider" type="System.Configuration.RsaProtectedConfigurationProvider, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" keyContainerName="RnDSuiteKeyContainer" useMachineContainer="true" />
</providers>
</configProtectedData>
<connectionStrings>
<clear />
<add name="RDnLContext" connectionString="metadata=res://RnD.Model.EF/RnDConnection.csdl|res://RnD.Model.EF/RnDConnection.ssdl|res://RnD.Model.EF/RnDConnection.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=LLK-DEV\;initial catalog=OpcenterRDnL;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
<add name="RDnLContext2" connectionString="metadata=res://*/RnDConnection.csdl|res://*/RnDConnection.ssdl|res://*/RnDConnection.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=LLK-DEV\;initial catalog=OpcenterRDnL;User=RDnLAppUser;Password=pass@word1;multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" />
<add name="OpcenterRDnL" connectionString="metadata=res://*/RnDConnection.csdl|res://*/RnDConnection.ssdl|res://*/RnDConnection.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=LLK-DEV\;initial catalog=OpcenterRDnL;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>
<appSettings>
<add key="Resources" value="%public%\OpcenterRDnL\Resources" />
<add key="MessageQueueHttp" value="HTTP://localhost/msmq/private$/OpcenterRDnLGIL/asynceventmanager" />
<add key="DefaultConnectionStringName" value="OpcenterRDnL" />
<add key="DefaultDataLanguageName" value="en-US" />
<add key="MaxODataTop" value="50" />
<add key="IsGIL" value="true" />
<add key="DisableHashFor" value="false" />
<add key="AuthenticationFilters" value="IntegrationUser, BasicAuthentication" />
</appSettings>
<!-- <eventManagerConfiguration isHistoryEnabled="true" useStandardConditions="true" useStandardActions="true" notifyClient="true" hubUrl="http://localhost/OpcenterRDnLEventManager/" useStandardActionsOnManualStatusChange="true" eventManagerName="AsyncEventManager" /> -->
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml" publicKeyToken="5803CFA389C90CE7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2019.2.612.40" newVersion="2019.2.612.40" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Telerik.Web.Spreadsheet" publicKeyToken="121FAE78165BA3D4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2019.2.619.40" newVersion="2019.2.619.40" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Telerik.Windows.Documents.Core" publicKeyToken="5803CFA389C90CE7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2019.2.612.40" newVersion="2019.2.612.40" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Telerik.Windows.Documents.Spreadsheet" publicKeyToken="5803CFA389C90CE7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2019.2.612.40" newVersion="2019.2.612.40" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http.WebHost" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.6.1.0" newVersion="5.6.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.OData.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.6.1.0" newVersion="7.6.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.OData.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.6.1.0" newVersion="7.6.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Spatial" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.6.1.0" newVersion="7.6.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Spatial" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.6.1.0" newVersion="5.6.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.6.1.0" newVersion="5.6.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
</configuration>
\ No newline at end of file
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.EntityFrameworkCore;
using NLog.Extensions.Logging;
using ProfitGroup.SampleNotifyService.Core.Auth;
using ProfitGroup.SampleNotifyService.Core.Handlers;
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities;
using ProfitGroup.SampleNotifyService.Services;
namespace ProfitGroup.SampleNotifyService.Core.Application
{
public static class Extensions
{
public static WebApplicationBuilder AddLogger(this WebApplicationBuilder builder)
{
var config = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.Build();
NLog.Config.LoggingConfiguration nlogConfig = new NLogLoggingConfiguration(config.GetSection("NLog"));
builder.Services.AddLogging((options) => { options.AddNLog(nlogConfig); });
return builder;
}
public static WebApplicationBuilder AddServices(this WebApplicationBuilder builder)
{
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddAuthentication("BasicAuthentication").
AddScheme<AuthenticationSchemeOptions, BasicAuthenticationHandler>
("BasicAuthentication", null);
builder.Services.AddDbContext<RDnLDatabaseContext>
(options => options.UseSqlServer(builder.Configuration.GetConnectionString("RnDConnection")));
builder.Services.AddTransient<Handlers.RouteHandler>();
builder.Services.AddTransient<INotifyService, NotifyService>();
builder.Services.AddAuthorization();
return builder;
}
public static WebApplication LoadSettings(this WebApplication app)
{
app.UseMiddleware<RequestScopedLoggerMiddleware>();
app.UseAuthentication();
app.UseAuthorization();
app.UseSwagger();
app.UseSwaggerUI();
app.RegisterRoutes();
return app;
}
private static WebApplication RegisterRoutes(this WebApplication app)
{
// var handler = app.Services.GetService<Handlers.RouteHandler>()!;
// app.MapPost("/handler", handler.TestHandler);
app.MapPost("/S4IntegrationService/SoapIntegration", [Authorize](HttpContext context, Handlers.RouteHandler handler) =>
{
return handler.SoapIntegration(context);
});
app.MapPost("/SoapIntegration", [Authorize] (HttpContext context, Handlers.RouteHandler handler) =>
{
return handler.SoapIntegration(context);
});
return app;
}
}
}
\ No newline at end of file
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.Options;
using System.Net.Http.Headers;
using System.Security.Claims;
using System.Text;
using System.Text.Encodings.Web;
namespace ProfitGroup.SampleNotifyService.Core.Auth
{
public class BasicAuthenticationHandler : AuthenticationHandler<AuthenticationSchemeOptions>
{
private ILogger _logger;
public BasicAuthenticationHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock)
{
this._logger = logger.CreateLogger<BasicAuthenticationHandler>();
}
protected override Task<AuthenticateResult> HandleAuthenticateAsync()
{
if (!Request.Headers.ContainsKey("Authorization"))
{
return Task.FromResult(AuthenticateResult.Fail($"|{Request.Method}| Missing Authorization Header"));
}
try
{
var authHeader = AuthenticationHeaderValue.Parse(Request.Headers["Authorization"]);
var credentialBytes = Convert.FromBase64String(authHeader.Parameter);
var credentials = Encoding.UTF8.GetString(credentialBytes).Split(':');
var username = credentials[0];
var password = credentials[1];
_logger.LogInformation($"Login: {username}, Password: {password}");
if (IsValidUser(username, password))
{
var claims = new[] { new Claim(ClaimTypes.Name, username) };
var identity = new ClaimsIdentity(claims, Scheme.Name);
var principal = new ClaimsPrincipal(identity);
var ticket = new AuthenticationTicket(principal, Scheme.Name);
return Task.FromResult(AuthenticateResult.Success(ticket));
}
else
{
return Task.FromResult(AuthenticateResult.Fail("Incorrect login or password"));
}
}
catch (Exception ex)
{
return Task.FromResult(AuthenticateResult.Fail("Error: " + ex.Message));
}
}
private bool IsValidUser(string username, string password)
{
#if DEBUG
return username == "S4test" && password == "ST6aAFw10";
#endif
return username == "S4test" && password == "ST6aAFw10";
}
}
}
using ProfitGroup.SampleNotifyService.Models;
namespace ProfitGroup.SampleNotifyService.Core.Configs
{
public class Config
{
public const AttributeSaveAction ActionType = AttributeSaveAction.PushToInfoCard;
// Specification
public const string SpecificationInfoFieldStatusTextName = "S4_ResponseSsText";
public const string SpecificationInfoFieldStatusCodeName = "S4_ResponseSsCode";
public const string SpecificationInfoFieldAENNR = "AENNR";
// Sample
public const string SampleInfoCardFieldName = "S4Integration_Probe";
public const string SampleInfoFieldStatusTextName = "S4_ResponseSsText_";
public const string SampleInfoFieldStatusCodeName = "S4_ResponseSsCode_";
public const string InfoFieldAennr = "AENNR";
public const string SpecificationAttributeName = "AENNR";
}
}
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore;
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities;
using System.Collections.Generic;
using System;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities.Configurations
{
public partial class ProfITS4MtLogConfiguration : IEntityTypeConfiguration<ProfITS4MtLog>
{
public void Configure(EntityTypeBuilder<ProfITS4MtLog> entity)
{
entity.HasNoKey();
entity.ToTable("ProfITS4MtLog", "RndSuite");
entity.Property(e => e.S4Status).HasMaxLength(10);
entity.Property(e => e.SendStatus)
.HasMaxLength(100)
.IsUnicode(false);
OnConfigurePartial(entity);
}
partial void OnConfigurePartial(EntityTypeBuilder<ProfITS4MtLog> entity);
}
}
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore;
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities;
using System.Collections.Generic;
using System;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities.Configurations
{
public partial class ProfITS4PrLogConfiguration : IEntityTypeConfiguration<ProfITS4PrLog>
{
public void Configure(EntityTypeBuilder<ProfITS4PrLog> entity)
{
entity.HasNoKey();
entity.ToTable("ProfITS4PrLog", "RndSuite");
entity.Property(e => e.S4Status).HasMaxLength(10);
entity.Property(e => e.SendStatus)
.HasMaxLength(100)
.IsUnicode(false);
OnConfigurePartial(entity);
}
partial void OnConfigurePartial(EntityTypeBuilder<ProfITS4PrLog> entity);
}
}
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore;
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities;
using System.Collections.Generic;
using System;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities.Configurations
{
public partial class RndtAuConfiguration : IEntityTypeConfiguration<RndtAu>
{
public void Configure(EntityTypeBuilder<RndtAu> entity)
{
entity.HasKey(e => new { e.AU, e.VERSION })
.HasName("RndkAU");
entity.ToTable("RndtAu", "RndSuite");
entity.HasIndex(e => e.UNIQUE_ID, "RndiAu")
.IsUnique();
entity.Property(e => e.AU).HasColumnType("numeric(12, 0)");
entity.Property(e => e.VERSION)
.HasColumnType("numeric(12, 4)")
.HasDefaultValueSql("((1))");
entity.Property(e => e.ACTIVE)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.ALLOW_MODIFY)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.AU_CLASS).HasMaxLength(2);
entity.Property(e => e.CF_VALUE)
.HasMaxLength(20)
.HasComment("function name if value_list_tp = C");
entity.Property(e => e.COMMENT_REQUIRED)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.DEFAULT_VALUE).HasMaxLength(2000);
entity.Property(e => e.DESCRIPTION).HasMaxLength(80);
entity.Property(e => e.DESCRIPTION2).HasMaxLength(80);
entity.Property(e => e.DSP_TP)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.FORMAT).HasMaxLength(40);
entity.Property(e => e.INHERIT_AU)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.IS_PROTECTED)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.LAST_COMMENT).HasMaxLength(255);
entity.Property(e => e.LC).HasColumnType("numeric(12, 0)");
entity.Property(e => e.LC_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.LOG_HS)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.NEW_VAL_ALLOWED)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength()
.HasComment("[1/0] user is allowed or forbidden to enter a value that is not in the list of value_list_tp");
entity.Property(e => e.RUN_MODE)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength()
.HasComment("program run modes: X = maximized, M = Minimized, N = Normal");
entity.Property(e => e.SERVICE)
.HasMaxLength(255)
.HasComment("attribute service: application that is used to visualise or access the file contained in the attributes value (for instance: MSWORD)");
entity.Property(e => e.SHORTCUT)
.HasMaxLength(8)
.HasComment("short cuts will be stored in the following manner: first two bytes - will contain hex VK code for Control i.e. 10h / next two bytes - will contain hex VK code or Shift i.e. 11h / next two bytes - will contain hex VK code for Alt i.e. 12h / next two bytes - will contain hex VK code for the key pressed or mouse click");
entity.Property(e => e.SHORT_DESC).HasMaxLength(20);
entity.Property(e => e.SINGLE_VALUED)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength()
.HasComment("[1/0]");
entity.Property(e => e.SS)
.HasColumnType("numeric(12, 0)")
.HasComment("state");
entity.Property(e => e.STORE_DB)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength()
.HasComment("[1/0]");
entity.Property(e => e.TRANSFERRED)
.HasMaxLength(1)
.IsUnicode(false)
.HasDefaultValueSql("('0')")
.IsFixedLength();
entity.Property(e => e.UNIQUE_ID)
.HasColumnType("numeric(12, 0)")
.ValueGeneratedOnAdd();
entity.Property(e => e.UNIT).HasMaxLength(80);
entity.Property(e => e.VALUE_LIST_TP)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength()
.HasComment("Allowed values: E = existing values (the selection list for the attributes value contains all already assigned values) / F = fixed list (the user enters a fixed list when defining the attribute) / Q = SQL query (the list of values will be defined by executing an SQL statement");
OnConfigurePartial(entity);
}
partial void OnConfigurePartial(EntityTypeBuilder<RndtAu> entity);
}
}
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore;
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities;
using System.Collections.Generic;
using System;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities.Configurations
{
public partial class RndtBomHeaderConfiguration : IEntityTypeConfiguration<RndtBomHeader>
{
public void Configure(EntityTypeBuilder<RndtBomHeader> entity)
{
entity.HasKey(e => new { e.SP, e.SP_VERSION, e.LO, e.ALTERNATIVE, e.BOM_USAGE, e.ICNODE, e.IINODE })
.HasName("RndkBomHeader");
entity.ToTable("RndtBomHeader", "RndSuite");
entity.Property(e => e.SP).HasColumnType("numeric(12, 0)");
entity.Property(e => e.SP_VERSION).HasColumnType("numeric(8, 0)");
entity.Property(e => e.LO).HasColumnType("numeric(12, 0)");
entity.Property(e => e.ALTERNATIVE).HasColumnType("numeric(2, 0)");
entity.Property(e => e.BOM_USAGE).HasColumnType("numeric(2, 0)");
entity.Property(e => e.ICNODE).HasColumnType("numeric(9, 0)");
entity.Property(e => e.IINODE).HasColumnType("numeric(9, 0)");
entity.Property(e => e.DESCRIPTION).HasMaxLength(80);
entity.Property(e => e.IC).HasColumnType("numeric(12, 0)");
entity.Property(e => e.II).HasColumnType("numeric(12, 0)");
OnConfigurePartial(entity);
}
partial void OnConfigurePartial(EntityTypeBuilder<RndtBomHeader> entity);
}
}
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore;
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities;
using System.Collections.Generic;
using System;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities.Configurations
{
public partial class RndtScConfiguration : IEntityTypeConfiguration<RndtSc>
{
public void Configure(EntityTypeBuilder<RndtSc> entity)
{
entity.HasKey(e => e.SC)
.HasName("Uksc");
entity.ToTable("RndtSc", "RndSuite");
entity.HasIndex(e => e.DESCRIPTION, "RndiSCDE");
entity.HasIndex(e => e.RQ, "RndiSCRQ");
entity.HasIndex(e => e.SC_VALUE, "RndiSCSCVALUE");
entity.HasIndex(e => e.SD, "RndiSCSD");
entity.HasIndex(e => e.ST, "RndiSCST");
entity.Property(e => e.SC)
.HasColumnType("numeric(12, 0)")
.HasComment("Sample code");
entity.Property(e => e.ACTIVE)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.ALLOW_ANY_IP)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.ALLOW_ANY_PP)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength()
.HasComment("[1/0] User can assign other parameter profiles to a sample of this sample type than those specified in the sample type definition");
entity.Property(e => e.ALLOW_MODIFY)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.CONTEXT).HasColumnType("numeric(12, 0)");
entity.Property(e => e.CREATED_BY)
.HasColumnType("numeric(12, 0)")
.HasComment("ID of the user who created the sample");
entity.Property(e => e.CREATION_DATE).HasComment("Date the sample was logged in Unilab4");
entity.Property(e => e.DESCRIPTION).HasMaxLength(80);
entity.Property(e => e.DESCR_DOC).HasMaxLength(80);
entity.Property(e => e.DESCR_DOC_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.HASH_PG).HasMaxLength(32);
entity.Property(e => e.IS_INTERVENTION)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.LABEL_FORMAT)
.HasMaxLength(20)
.HasComment("label format used for the samples (set at configurational level)");
entity.Property(e => e.LAST_COMMENT).HasMaxLength(255);
entity.Property(e => e.LC)
.HasColumnType("numeric(12, 0)")
.HasComment("default life cycle model for newly created samples ( set at RndtSt level)");
entity.Property(e => e.LC_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.LOG_HS)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.PRIORITY)
.HasColumnType("numeric(3, 0)")
.HasComment("[ + INDICATOR] at configurational level (RndtSt), but can be modified at operational level");
entity.Property(e => e.RQ)
.HasColumnType("numeric(12, 0)")
.HasComment("ID of the request when a sample is created in a request");
entity.Property(e => e.SAMPLING_DATE).HasComment("by default = CREATION_DATE : can be modified");
entity.Property(e => e.SC_CLASS).HasMaxLength(2);
entity.Property(e => e.SC_VALUE).HasMaxLength(20);
entity.Property(e => e.SD).HasColumnType("numeric(12, 0)");
entity.Property(e => e.SHELF_LIFE_UNIT)
.HasMaxLength(20)
.HasComment("unit in which the shelf life value is expressed; inherited from RndtSt");
entity.Property(e => e.SHELF_LIFE_VAL)
.HasColumnType("numeric(3, 0)")
.HasComment("sample shelf life limit at operational level; inherited from RndtSt");
entity.Property(e => e.SS)
.HasColumnType("numeric(12, 0)")
.HasComment("state");
entity.Property(e => e.ST)
.HasColumnType("numeric(12, 0)")
.HasComment("sample type for this sample");
entity.Property(e => e.ST_SHORT_DESC).HasMaxLength(20);
entity.Property(e => e.ST_VERSION).HasColumnType("numeric(12, 4)");
OnConfigurePartial(entity);
}
partial void OnConfigurePartial(EntityTypeBuilder<RndtSc> entity);
}
}
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore;
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities;
using System.Collections.Generic;
using System;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities.Configurations
{
public partial class RndtScIcConfiguration : IEntityTypeConfiguration<RndtScIc>
{
public void Configure(EntityTypeBuilder<RndtScIc> entity)
{
entity.HasKey(e => new { e.SC, e.IC, e.ICNODE })
.HasName("RndkSCIC");
entity.ToTable("RndtScIc", "RndSuite");
entity.Property(e => e.SC).HasColumnType("numeric(12, 0)");
entity.Property(e => e.IC).HasColumnType("numeric(12, 0)");
entity.Property(e => e.ICNODE).HasColumnType("numeric(9, 0)");
entity.Property(e => e.ACTIVE)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.ALLOW_MODIFY)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.DESCRIPTION).HasMaxLength(80);
entity.Property(e => e.DSP_TITLE).HasMaxLength(80);
entity.Property(e => e.FREQ_TP)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.HIDDEN)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.IC_CLASS).HasMaxLength(2);
entity.Property(e => e.IC_SHORT_DESC).HasMaxLength(20);
entity.Property(e => e.IMG_LINK).HasMaxLength(40);
entity.Property(e => e.IP_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.IS_PROTECTED)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.LAST_COMMENT).HasMaxLength(255);
entity.Property(e => e.LC).HasColumnType("numeric(12, 0)");
entity.Property(e => e.LC_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.LOG_HS)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.MANUALLY_ADDED)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.NEXT_II).HasColumnType("numeric(12, 0)");
entity.Property(e => e.SS).HasColumnType("numeric(12, 0)");
entity.Property(e => e.UNIQUE_ID)
.HasColumnType("numeric(12, 0)")
.ValueGeneratedOnAdd();
entity.Property(e => e.WINSIZE_X).HasColumnType("numeric(4, 0)");
entity.Property(e => e.WINSIZE_Y).HasColumnType("numeric(4, 0)");
OnConfigurePartial(entity);
}
partial void OnConfigurePartial(EntityTypeBuilder<RndtScIc> entity);
}
}
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore;
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities;
using System.Collections.Generic;
using System;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities.Configurations
{
public partial class RndtScIiConfiguration : IEntityTypeConfiguration<RndtScIi>
{
public void Configure(EntityTypeBuilder<RndtScIi> entity)
{
entity.HasKey(e => new { e.SC, e.IC, e.ICNODE, e.II, e.IINODE })
.HasName("RndkSCII");
entity.ToTable("RndtScIi", "RndSuite");
entity.Property(e => e.SC).HasColumnType("numeric(12, 0)");
entity.Property(e => e.IC).HasColumnType("numeric(12, 0)");
entity.Property(e => e.ICNODE).HasColumnType("numeric(9, 0)");
entity.Property(e => e.II).HasColumnType("numeric(12, 0)");
entity.Property(e => e.IINODE).HasColumnType("numeric(9, 0)");
entity.Property(e => e.ACTIVE)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.ALLOW_MODIFY)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.CALC_FORMULA).HasMaxLength(2000);
entity.Property(e => e.COMMENT_REQUIRED)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.DSP_LEN).HasColumnType("numeric(4, 0)");
entity.Property(e => e.DSP_ROWS).HasColumnType("numeric(4, 0)");
entity.Property(e => e.DSP_TITLE).HasMaxLength(40);
entity.Property(e => e.DSP_TP)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.HIDDEN)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.IDENTIFIER).HasMaxLength(26);
entity.Property(e => e.IE_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.II_CLASS).HasMaxLength(2);
entity.Property(e => e.II_SHORT_DESC).HasMaxLength(20);
entity.Property(e => e.IS_PROTECTED)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.LC).HasColumnType("numeric(12, 0)");
entity.Property(e => e.LC_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.LOG_HS)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.MANDATORY)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.POS_X).HasColumnType("numeric(4, 0)");
entity.Property(e => e.POS_Y).HasColumnType("numeric(4, 0)");
entity.Property(e => e.RADIO_BUTTON_GROUP).HasMaxLength(50);
entity.Property(e => e.SS).HasColumnType("numeric(12, 0)");
OnConfigurePartial(entity);
}
partial void OnConfigurePartial(EntityTypeBuilder<RndtScIi> entity);
}
}
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore;
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities;
using System.Collections.Generic;
using System;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities.Configurations
{
public partial class RndtSpAuConfiguration : IEntityTypeConfiguration<RndtSpAu>
{
public void Configure(EntityTypeBuilder<RndtSpAu> entity)
{
entity.HasKey(e => new { e.SP, e.SP_VERSION, e.AU, e.AUSEQ })
.HasName("RndkSpAu");
entity.ToTable("RndtSpAu", "RndSuite");
entity.Property(e => e.SP).HasColumnType("numeric(12, 0)");
entity.Property(e => e.SP_VERSION)
.HasColumnType("numeric(12, 4)")
.HasDefaultValueSql("((1))");
entity.Property(e => e.AU).HasColumnType("numeric(12, 0)");
entity.Property(e => e.AUSEQ).HasColumnType("numeric(5, 0)");
entity.Property(e => e.AU_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.VALUE).HasMaxLength(2000);
OnConfigurePartial(entity);
}
partial void OnConfigurePartial(EntityTypeBuilder<RndtSpAu> entity);
}
}
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore;
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities;
using System.Collections.Generic;
using System;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities.Configurations
{
public partial class RndtSpConfiguration : IEntityTypeConfiguration<RndtSp>
{
public void Configure(EntityTypeBuilder<RndtSp> entity)
{
entity.HasKey(e => new { e.SP, e.SP_VERSION })
.HasName("RndkSp");
entity.ToTable("RndtSp", "RndSuite");
entity.HasIndex(e => e.UNIQUE_ID, "RndiSp")
.IsUnique();
entity.Property(e => e.SP).HasColumnType("numeric(12, 0)");
entity.Property(e => e.SP_VERSION)
.HasColumnType("numeric(12, 4)")
.HasDefaultValueSql("((1))");
entity.Property(e => e.ACTIVE)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.ALLOW_ANY_IP)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.ALLOW_MODIFY)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.CONTEXT).HasColumnType("numeric(12, 0)");
entity.Property(e => e.CREATED_BY).HasColumnType("numeric(12, 0)");
entity.Property(e => e.DESCRIPTION)
.IsRequired()
.HasMaxLength(80);
entity.Property(e => e.FR).HasColumnType("numeric(12, 0)");
entity.Property(e => e.FR_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.HAS_ADHOC_APPROVAL)
.IsRequired()
.HasMaxLength(1)
.IsUnicode(false)
.HasDefaultValueSql("('0')")
.IsFixedLength();
entity.Property(e => e.LAST_COMMENT).HasMaxLength(255);
entity.Property(e => e.LC).HasColumnType("numeric(12, 0)");
entity.Property(e => e.LC_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.LOG_HS)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.MA).HasColumnType("numeric(12, 0)");
entity.Property(e => e.SP_VALUE)
.IsRequired()
.HasMaxLength(20);
entity.Property(e => e.SS).HasColumnType("numeric(12, 0)");
entity.Property(e => e.STYPE).HasColumnType("numeric(8, 0)");
entity.Property(e => e.UNIQUE_ID)
.HasColumnType("numeric(12, 0)")
.ValueGeneratedOnAdd();
OnConfigurePartial(entity);
}
partial void OnConfigurePartial(EntityTypeBuilder<RndtSp> entity);
}
}
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore;
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities;
using System.Collections.Generic;
using System;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities.Configurations
{
public partial class RndtSpIcConfiguration : IEntityTypeConfiguration<RndtSpIc>
{
public void Configure(EntityTypeBuilder<RndtSpIc> entity)
{
entity.HasKey(e => new { e.SP, e.SP_VERSION, e.IC, e.ICNODE })
.HasName("RndkSpIc");
entity.ToTable("RndtSpIc", "RndSuite");
entity.HasIndex(e => new { e.SP_VALUE, e.SP_VERSION, e.IC }, "RndiSpIc");
entity.Property(e => e.SP).HasColumnType("numeric(12, 0)");
entity.Property(e => e.SP_VERSION)
.HasColumnType("numeric(12, 4)")
.HasDefaultValueSql("((1))");
entity.Property(e => e.IC).HasColumnType("numeric(12, 0)");
entity.Property(e => e.ICNODE).HasColumnType("numeric(9, 0)");
entity.Property(e => e.ACTIVE)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.ALLOW_MODIFY)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.DESCRIPTION).HasMaxLength(80);
entity.Property(e => e.DSP_TITLE).HasMaxLength(80);
entity.Property(e => e.FREQ_TP)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.HIDDEN)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.IC_SHORT_DESC).HasMaxLength(20);
entity.Property(e => e.IMG_LINK).HasMaxLength(40);
entity.Property(e => e.IP_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.IS_PROTECTED)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.LAST_COMMENT).HasMaxLength(255);
entity.Property(e => e.LC).HasColumnType("numeric(12, 0)");
entity.Property(e => e.LC_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.LOG_HS)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.SP_VALUE)
.IsRequired()
.HasMaxLength(20);
entity.Property(e => e.SS).HasColumnType("numeric(12, 0)");
entity.Property(e => e.UNIQUE_ID)
.HasColumnType("numeric(12, 0)")
.ValueGeneratedOnAdd();
entity.Property(e => e.WINSIZE_X).HasColumnType("numeric(4, 0)");
entity.Property(e => e.WINSIZE_Y).HasColumnType("numeric(4, 0)");
OnConfigurePartial(entity);
}
partial void OnConfigurePartial(EntityTypeBuilder<RndtSpIc> entity);
}
}
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore;
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities;
using System.Collections.Generic;
using System;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities.Configurations
{
public partial class RndtSpIiConfiguration : IEntityTypeConfiguration<RndtSpIi>
{
public void Configure(EntityTypeBuilder<RndtSpIi> entity)
{
entity.HasKey(e => new { e.SP, e.SP_VERSION, e.IC, e.ICNODE, e.IINODE })
.HasName("RndkSpIi");
entity.ToTable("RndtSpIi", "RndSuite");
entity.Property(e => e.SP).HasColumnType("numeric(12, 0)");
entity.Property(e => e.SP_VERSION)
.HasColumnType("numeric(12, 4)")
.HasDefaultValueSql("((1))");
entity.Property(e => e.IC).HasColumnType("numeric(12, 0)");
entity.Property(e => e.ICNODE).HasColumnType("numeric(9, 0)");
entity.Property(e => e.IINODE).HasColumnType("numeric(9, 0)");
entity.Property(e => e.ACTIVE)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.ALLOW_MODIFY)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.CALC_FORMULA).HasMaxLength(2000);
entity.Property(e => e.COMMENT_REQUIRED)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.DSP_LEN).HasColumnType("numeric(4, 0)");
entity.Property(e => e.DSP_ROWS).HasColumnType("numeric(4, 0)");
entity.Property(e => e.DSP_TITLE).HasMaxLength(40);
entity.Property(e => e.DSP_TP)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.HIDDEN)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.IDENTIFIER).HasMaxLength(26);
entity.Property(e => e.IE_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.II).HasColumnType("numeric(12, 0)");
entity.Property(e => e.II_CLASS).HasMaxLength(2);
entity.Property(e => e.II_SHORT_DESC).HasMaxLength(20);
entity.Property(e => e.IS_PROTECTED)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.LC).HasColumnType("numeric(12, 0)");
entity.Property(e => e.LC_VERSION).HasColumnType("numeric(12, 4)");
entity.Property(e => e.LOG_HS)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.MANDATORY)
.HasMaxLength(1)
.IsUnicode(false)
.IsFixedLength();
entity.Property(e => e.POS_X).HasColumnType("numeric(4, 0)");
entity.Property(e => e.POS_Y).HasColumnType("numeric(4, 0)");
entity.Property(e => e.RADIO_BUTTON_GROUP).HasMaxLength(50);
entity.Property(e => e.SS).HasColumnType("numeric(12, 0)");
OnConfigurePartial(entity);
}
partial void OnConfigurePartial(EntityTypeBuilder<RndtSpIi> entity);
}
}
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities
{
public partial class ProfITS4MtLog
{
public string GUID { get; set; }
public int? MT { get; set; }
public int? MT_VERSION { get; set; }
public DateTimeOffset? DateSent { get; set; }
public string SendStatus { get; set; }
public string S4Status { get; set; }
public string S4StatusText { get; set; }
public DateTimeOffset? S4StatusDate { get; set; }
}
}
\ No newline at end of file
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities
{
public partial class ProfITS4PrLog
{
public string GUID { get; set; }
public int? PR { get; set; }
public int? PR_VERSION { get; set; }
public DateTimeOffset? DateSent { get; set; }
public string SendStatus { get; set; }
public string S4Status { get; set; }
public string S4StatusText { get; set; }
public DateTimeOffset? S4StatusDate { get; set; }
}
}
\ No newline at end of file
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore;
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities.Configurations;
using System.Collections.Generic;
using System;
#nullable disable
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities
{
public partial class RDnLDatabaseContext : DbContext
{
public RDnLDatabaseContext()
{
}
public RDnLDatabaseContext(DbContextOptions<RDnLDatabaseContext> options)
: base(options)
{
}
public virtual DbSet<ProfITS4MtLog> ProfITS4MtLog { get; set; }
public virtual DbSet<ProfITS4PrLog> ProfITS4PrLog { get; set; }
public virtual DbSet<RndtAu> RndtAu { get; set; }
public virtual DbSet<RndtBomHeader> RndtBomHeader { get; set; }
public virtual DbSet<RndtSc> RndtSc { get; set; }
public virtual DbSet<RndtScIc> RndtScIc { get; set; }
public virtual DbSet<RndtScIi> RndtScIi { get; set; }
public virtual DbSet<RndtSp> RndtSp { get; set; }
public virtual DbSet<RndtSpAu> RndtSpAu { get; set; }
public virtual DbSet<RndtSpIc> RndtSpIc { get; set; }
public virtual DbSet<RndtSpIi> RndtSpIi { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfiguration(new Configurations.ProfITS4MtLogConfiguration());
modelBuilder.ApplyConfiguration(new Configurations.ProfITS4PrLogConfiguration());
modelBuilder.ApplyConfiguration(new Configurations.RndtAuConfiguration());
modelBuilder.ApplyConfiguration(new Configurations.RndtBomHeaderConfiguration());
modelBuilder.ApplyConfiguration(new Configurations.RndtScConfiguration());
modelBuilder.ApplyConfiguration(new Configurations.RndtScIcConfiguration());
modelBuilder.ApplyConfiguration(new Configurations.RndtScIiConfiguration());
modelBuilder.ApplyConfiguration(new Configurations.RndtSpConfiguration());
modelBuilder.ApplyConfiguration(new Configurations.RndtSpAuConfiguration());
modelBuilder.ApplyConfiguration(new Configurations.RndtSpIcConfiguration());
modelBuilder.ApplyConfiguration(new Configurations.RndtSpIiConfiguration());
modelBuilder.HasSequence("RndsAlId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsAuId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsBomImplosionId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsBOMNoId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsBU", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsCellId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsChId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsCmId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsCnId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsCompId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsContactId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsCpId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsCsId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsCyId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsDcId", "RndSuite")
.StartsAt(1203)
.HasMin(1);
modelBuilder.HasSequence("RndsEqId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsEqTpId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsEtId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsEvTimedId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsFbSheetColumnId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsFbSheetId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsFbSheetRowId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsFmFavoriteId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsFmMatId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsFnId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsFrId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsFtFavoriteId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsGrId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsIdId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsIeId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsIpId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsIpIeFormulaID", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsLangId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsLcFa_LCFA_ID", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsLcId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsLcTypeId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsLoId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsLoTypeId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsLpId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsLyId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsMtId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsPaId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsPcGoId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsPcId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsPlId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsPltId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsPpId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsPrId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsPRSEQId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsPtId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsRegId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsRpId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsRqId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsRqIiFormulaId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsRssId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsRtId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsSchEvId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsSchEvTestPlan", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsSchGroupId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsSchId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsSchtId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsScId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsSdId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsSpId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsSpIiCompId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsSpIiFormulaID", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsSpShCoId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsSpShOpId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsSsId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsStId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsSTYPEId", "RndSuite")
.StartsAt(8)
.HasMin(1);
modelBuilder.HasSequence("RndsSynId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsTkId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsTrEventNr", "RndSuite")
.HasMin(1)
.IsCyclic();
modelBuilder.HasSequence("RndsUcId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsUnitId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsUpId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsWdgId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsWellTypeId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsWfId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsWfIiFormulaId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsWfTpId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsWpId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsWsId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("RndsWtId", "RndSuite").HasMin(1);
modelBuilder.HasSequence("SiswSTMatID", "RndSuite").StartsAt(15000);
modelBuilder.HasSequence("SiswTechID", "RndSuite");
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
}
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities
{
public partial class RndtAu
{
public decimal AU { get; set; }
public string SHORT_DESC { get; set; }
public decimal VERSION { get; set; }
public DateTimeOffset? EFFECTIVE_FROM { get; set; }
public DateTimeOffset? EFFECTIVE_TILL { get; set; }
public string DESCRIPTION { get; set; }
public string DESCRIPTION2 { get; set; }
public string IS_PROTECTED { get; set; }
/// <summary>
/// [1/0]
/// </summary>
public string SINGLE_VALUED { get; set; }
/// <summary>
/// [1/0] user is allowed or forbidden to enter a value that is not in the list of value_list_tp
/// </summary>
public string NEW_VAL_ALLOWED { get; set; }
/// <summary>
/// [1/0]
/// </summary>
public string STORE_DB { get; set; }
public string INHERIT_AU { get; set; }
/// <summary>
/// short cuts will be stored in the following manner: first two bytes - will contain hex VK code for Control i.e. 10h / next two bytes - will contain hex VK code or Shift i.e. 11h / next two bytes - will contain hex VK code for Alt i.e. 12h / next two bytes - will contain hex VK code for the key pressed or mouse click
/// </summary>
public byte[] SHORTCUT { get; set; }
/// <summary>
/// Allowed values: E = existing values (the selection list for the attributes value contains all already assigned values) / F = fixed list (the user enters a fixed list when defining the attribute) / Q = SQL query (the list of values will be defined by executing an SQL statement
/// </summary>
public string VALUE_LIST_TP { get; set; }
public string DEFAULT_VALUE { get; set; }
/// <summary>
/// program run modes: X = maximized, M = Minimized, N = Normal
/// </summary>
public string RUN_MODE { get; set; }
/// <summary>
/// attribute service: application that is used to visualise or access the file contained in the attributes value (for instance: MSWORD)
/// </summary>
public string SERVICE { get; set; }
/// <summary>
/// function name if value_list_tp = C
/// </summary>
public string CF_VALUE { get; set; }
public string LAST_COMMENT { get; set; }
public string AU_CLASS { get; set; }
public string LOG_HS { get; set; }
public string ALLOW_MODIFY { get; set; }
public string ACTIVE { get; set; }
public decimal? LC { get; set; }
public decimal? LC_VERSION { get; set; }
/// <summary>
/// state
/// </summary>
public decimal? SS { get; set; }
public string TRANSFERRED { get; set; }
public decimal UNIQUE_ID { get; set; }
public string COMMENT_REQUIRED { get; set; }
public string UNIT { get; set; }
public string FORMAT { get; set; }
public string DSP_TP { get; set; }
}
}
\ No newline at end of file
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities
{
public partial class RndtBomHeader
{
public decimal SP { get; set; }
public decimal SP_VERSION { get; set; }
public decimal LO { get; set; }
public decimal ALTERNATIVE { get; set; }
public decimal BOM_USAGE { get; set; }
public decimal IC { get; set; }
public decimal ICNODE { get; set; }
public decimal II { get; set; }
public decimal IINODE { get; set; }
public string DESCRIPTION { get; set; }
}
}
\ No newline at end of file
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities
{
public partial class RndtSc
{
/// <summary>
/// Sample code
/// </summary>
public decimal SC { get; set; }
public string SC_VALUE { get; set; }
/// <summary>
/// sample type for this sample
/// </summary>
public decimal? ST { get; set; }
public string ST_SHORT_DESC { get; set; }
public decimal? ST_VERSION { get; set; }
public string DESCRIPTION { get; set; }
/// <summary>
/// sample shelf life limit at operational level; inherited from RndtSt
/// </summary>
public decimal SHELF_LIFE_VAL { get; set; }
/// <summary>
/// unit in which the shelf life value is expressed; inherited from RndtSt
/// </summary>
public string SHELF_LIFE_UNIT { get; set; }
/// <summary>
/// by default = CREATION_DATE : can be modified
/// </summary>
public DateTimeOffset? SAMPLING_DATE { get; set; }
/// <summary>
/// Date the sample was logged in Unilab4
/// </summary>
public DateTimeOffset? CREATION_DATE { get; set; }
/// <summary>
/// ID of the user who created the sample
/// </summary>
public decimal? CREATED_BY { get; set; }
public DateTimeOffset? EXEC_START_DATE { get; set; }
public DateTimeOffset? EXEC_END_DATE { get; set; }
/// <summary>
/// [ + INDICATOR] at configurational level (RndtSt), but can be modified at operational level
/// </summary>
public decimal? PRIORITY { get; set; }
/// <summary>
/// label format used for the samples (set at configurational level)
/// </summary>
public string LABEL_FORMAT { get; set; }
public string DESCR_DOC { get; set; }
public decimal? DESCR_DOC_VERSION { get; set; }
/// <summary>
/// ID of the request when a sample is created in a request
/// </summary>
public decimal? RQ { get; set; }
public decimal? SD { get; set; }
public DateTimeOffset? DATE1 { get; set; }
public DateTimeOffset? DATE2 { get; set; }
public DateTimeOffset? DATE3 { get; set; }
public DateTimeOffset? DATE4 { get; set; }
public DateTimeOffset? DATE5 { get; set; }
/// <summary>
/// [1/0] User can assign other parameter profiles to a sample of this sample type than those specified in the sample type definition
/// </summary>
public string ALLOW_ANY_PP { get; set; }
public string LAST_COMMENT { get; set; }
public string SC_CLASS { get; set; }
public string LOG_HS { get; set; }
public string ALLOW_MODIFY { get; set; }
public string ACTIVE { get; set; }
/// <summary>
/// default life cycle model for newly created samples ( set at RndtSt level)
/// </summary>
public decimal? LC { get; set; }
public decimal? LC_VERSION { get; set; }
/// <summary>
/// state
/// </summary>
public decimal? SS { get; set; }
public decimal? CONTEXT { get; set; }
public string IS_INTERVENTION { get; set; }
public string ALLOW_ANY_IP { get; set; }
public string HASH_PG { get; set; }
}
}
\ No newline at end of file
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities
{
public partial class RndtScIc
{
public decimal SC { get; set; }
public decimal IC { get; set; }
public string IC_SHORT_DESC { get; set; }
public decimal ICNODE { get; set; }
public decimal? IP_VERSION { get; set; }
public string DESCRIPTION { get; set; }
public decimal WINSIZE_X { get; set; }
public decimal WINSIZE_Y { get; set; }
public string IS_PROTECTED { get; set; }
public string HIDDEN { get; set; }
public string MANUALLY_ADDED { get; set; }
public decimal? NEXT_II { get; set; }
public string LAST_COMMENT { get; set; }
public string IC_CLASS { get; set; }
public string LOG_HS { get; set; }
public string ALLOW_MODIFY { get; set; }
public string ACTIVE { get; set; }
public decimal? LC { get; set; }
public decimal? LC_VERSION { get; set; }
public decimal? SS { get; set; }
public decimal UNIQUE_ID { get; set; }
public string IMG_LINK { get; set; }
public string DSP_TITLE { get; set; }
public string FREQ_TP { get; set; }
}
}
\ No newline at end of file
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities
{
public partial class RndtScIi
{
public decimal SC { get; set; }
public decimal IC { get; set; }
public decimal ICNODE { get; set; }
public decimal II { get; set; }
public string II_SHORT_DESC { get; set; }
public decimal IINODE { get; set; }
public decimal? IE_VERSION { get; set; }
public string IIVALUE { get; set; }
public decimal POS_X { get; set; }
public decimal POS_Y { get; set; }
public string IS_PROTECTED { get; set; }
public string MANDATORY { get; set; }
public string HIDDEN { get; set; }
public string DSP_TITLE { get; set; }
public decimal DSP_LEN { get; set; }
public string DSP_TP { get; set; }
public decimal DSP_ROWS { get; set; }
public string II_CLASS { get; set; }
public string LOG_HS { get; set; }
public string ALLOW_MODIFY { get; set; }
public string ACTIVE { get; set; }
public decimal? LC { get; set; }
public decimal? LC_VERSION { get; set; }
public decimal? SS { get; set; }
public string COMMENT_REQUIRED { get; set; }
public string CALC_FORMULA { get; set; }
public double? IIVALUEF { get; set; }
public string IDENTIFIER { get; set; }
public string RADIO_BUTTON_GROUP { get; set; }
}
}
\ No newline at end of file
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities
{
public partial class RndtSp
{
public decimal SP { get; set; }
public string SP_VALUE { get; set; }
public decimal SP_VERSION { get; set; }
public string DESCRIPTION { get; set; }
public DateTimeOffset? LAST_STATUS_CHANGE { get; set; }
public decimal? CREATED_BY { get; set; }
public DateTimeOffset? CREATED_ON { get; set; }
public decimal FR { get; set; }
public decimal FR_VERSION { get; set; }
public decimal? LC { get; set; }
public decimal? LC_VERSION { get; set; }
public decimal? SS { get; set; }
public DateTimeOffset? EFFECTIVE_TILL { get; set; }
public DateTimeOffset? EFFECTIVE_FROM { get; set; }
public decimal STYPE { get; set; }
public string ALLOW_MODIFY { get; set; }
public string ACTIVE { get; set; }
public string LOG_HS { get; set; }
public decimal? CONTEXT { get; set; }
public decimal UNIQUE_ID { get; set; }
public string ALLOW_ANY_IP { get; set; }
public string LAST_COMMENT { get; set; }
public string HAS_ADHOC_APPROVAL { get; set; }
public decimal MA { get; set; }
}
}
\ No newline at end of file
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities
{
public partial class RndtSpAu
{
public decimal SP { get; set; }
public decimal SP_VERSION { get; set; }
public decimal AU { get; set; }
public decimal AU_VERSION { get; set; }
public decimal AUSEQ { get; set; }
public string VALUE { get; set; }
}
}
\ No newline at end of file
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities
{
public partial class RndtSpIc
{
public decimal SP { get; set; }
public string SP_VALUE { get; set; }
public decimal SP_VERSION { get; set; }
public decimal IC { get; set; }
public string IC_SHORT_DESC { get; set; }
public decimal ICNODE { get; set; }
public decimal? IP_VERSION { get; set; }
public string DESCRIPTION { get; set; }
public decimal WINSIZE_X { get; set; }
public decimal WINSIZE_Y { get; set; }
public string IS_PROTECTED { get; set; }
public string HIDDEN { get; set; }
public string LAST_COMMENT { get; set; }
public string LOG_HS { get; set; }
public string ALLOW_MODIFY { get; set; }
public string ACTIVE { get; set; }
public decimal? LC { get; set; }
public decimal? LC_VERSION { get; set; }
public decimal? SS { get; set; }
public decimal UNIQUE_ID { get; set; }
public string IMG_LINK { get; set; }
public string DSP_TITLE { get; set; }
public string FREQ_TP { get; set; }
}
}
\ No newline at end of file
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using System;
using System.Collections.Generic;
namespace ProfitGroup.SampleNotifyService.Data.Core.Data.Entities
{
public partial class RndtSpIi
{
public decimal SP { get; set; }
public decimal SP_VERSION { get; set; }
public decimal IC { get; set; }
public decimal ICNODE { get; set; }
public decimal II { get; set; }
public string II_SHORT_DESC { get; set; }
public decimal IINODE { get; set; }
public decimal? IE_VERSION { get; set; }
public string IIVALUE { get; set; }
public decimal POS_X { get; set; }
public decimal POS_Y { get; set; }
public string IS_PROTECTED { get; set; }
public string MANDATORY { get; set; }
public string HIDDEN { get; set; }
public string DSP_TITLE { get; set; }
public decimal DSP_LEN { get; set; }
public string DSP_TP { get; set; }
public decimal DSP_ROWS { get; set; }
public string II_CLASS { get; set; }
public string LOG_HS { get; set; }
public string ALLOW_MODIFY { get; set; }
public string ACTIVE { get; set; }
public decimal? LC { get; set; }
public decimal? LC_VERSION { get; set; }
public decimal? SS { get; set; }
public string COMMENT_REQUIRED { get; set; }
public string CALC_FORMULA { get; set; }
public double? IIVALUEF { get; set; }
public string IDENTIFIER { get; set; }
public string RADIO_BUTTON_GROUP { get; set; }
}
}
\ No newline at end of file
using System.Text;
namespace ProfitGroup.SampleNotifyService.Core.Handlers
{
public static class BodyParser
{
/// <summary>
/// Получение тело из POST запроса
/// </summary>
/// <param name="request">Http запросы</param>
/// <returns>Тело запроса</returns>
public static async Task<string> ParseBodyAsync(this HttpRequest request)
{
using var reader = new StreamReader(request.Body, Encoding.UTF8);
return await reader.ReadToEndAsync();
}
}
}
using System.Xml.Serialization;
namespace ProfitGroup.SampleNotifyService.Core.Handlers
{
public static class ContentDeserializer
{
public static T? Deserialize<T>(string content, out string message)
{
message = string.Empty;
try
{
var serializer = new XmlSerializer(typeof(T));
using var stringReader = new StringReader(content);
var data = new StringReader(content);
return (T)serializer.Deserialize(data)!;
}
catch (Exception e)
{
message = e.Message;
return default;
}
}
}
}
namespace ProfitGroup.SampleNotifyService.Core.Handlers;
public class RequestScopedLoggerMiddleware
{
private readonly RequestDelegate _next;
public RequestScopedLoggerMiddleware(RequestDelegate next)
{
_next = next;
}
[Obsolete("Obsolete")]
public async Task Invoke(HttpContext context)
{
var requestGuid = Guid.NewGuid();
NLog.MappedDiagnosticsContext.Set("RequestGuid", requestGuid.ToString());
await _next(context);
}
}
\ No newline at end of file
This diff is collapsed.
namespace ProfitGroup.SampleNotifyService.Models
{
public enum AttributeSaveAction
{
// Сохранение значения в атрибут спецификации
PushToAttribute = 0,
// Сохранение значения в параметр инфокарты
PushToInfoCard = 1
}
}
using System.Xml.Serialization;
namespace ProfitGroup.SampleNotifyService.Models
{
[XmlRoot(ElementName = "Confirmation", Namespace = "")]
public class Confirmation
{
[XmlAttribute(AttributeName = "ObjectType", Namespace = "")]
public int ObjectType { get; set; }
[XmlAttribute(AttributeName = "ResponseType", Namespace = "")]
public string ResponseType { get; set; }
[XmlAttribute(AttributeName = "ID", Namespace = "")]
public int ID { get; set; }
[XmlAttribute(AttributeName = "Version", Namespace = "")]
public int Version { get; set; }
[XmlAttribute(AttributeName = "StatusCode", Namespace = "")]
public string StatusCode { get; set; }
[XmlAttribute(AttributeName = "StatusText", Namespace = "")]
public string StatusText { get; set; }
[XmlAttribute(AttributeName = "WERKS", Namespace = "")]
public string Werks { get; set; }
}
[XmlRoot(ElementName = "MT_Confirmation", Namespace = "http://lukoil.ru/opcenter/ORM")]
public class MTConfirmation
{
[XmlElement(ElementName = "Confirmation", Namespace = "")]
public Confirmation Confirmation { get; set; }
}
[XmlRoot(ElementName = "Body", Namespace = "http://schemas.xmlsoap.org/soap/envelope/")]
public class Body
{
[XmlElement(ElementName = "MT_Confirmation", Namespace = "http://lukoil.ru/opcenter/ORM")]
public MTConfirmation MTConfirmation { get; set; }
}
[XmlRoot(ElementName = "Envelope", Namespace = "http://schemas.xmlsoap.org/soap/envelope/")]
public class Envelope
{
[XmlElement(ElementName = "Header", Namespace = "http://schemas.xmlsoap.org/soap/envelope/")]
public object Header { get; set; }
[XmlElement(ElementName = "Body", Namespace = "http://schemas.xmlsoap.org/soap/envelope/")]
public Body Body { get; set; }
}
}
namespace ProfitGroup.SampleNotifyService.Models
{
public enum ObjectTypes
{
Specification = 0,
Sample = 1,
Method = 2,
Parameter = 3
}
}
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.4" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.4" />
<PackageReference Include="runtime.native.System.Data.SqlClient.sni" Version="4.7.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="EntityFramework">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="RnD.Common">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.Common.dll</HintPath>
</Reference>
<Reference Include="RnD.Model.EF">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.Model.EF.dll</HintPath>
</Reference>
<Reference Include="System.Data.SqlClient">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\S4IntegrationService\publish\runtimes\win\lib\netcoreapp2.1\System.Data.SqlClient.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http.OData">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLBackEnd\bin\System.Web.Http.OData.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Update="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="Core\Data\" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.11">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.4" />
<PackageReference Include="NLog.Web" Version="5.3.5" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
</ItemGroup>
<ItemGroup>
<Content Update="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="Core\Data\" />
</ItemGroup>
<ItemGroup>
<Compile Update="Services\NotifyService.cs">
<DependentUpon>INotifyService.cs</DependentUpon>
</Compile>
</ItemGroup>
</Project>
using ProfitGroup.SampleNotifyService.Core.Application;
WebApplication
.CreateBuilder(args)
.AddLogger()
.AddServices()
.Build()
.LoadSettings()
.Run();
\ No newline at end of file
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5079",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"http-production": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5001",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Production"
}
}
}
}
using ProfitGroup.SampleNotifyService.Data.Core.Data.Entities;
namespace ProfitGroup.SampleNotifyService.Services;
public interface INotifyService
{
/// <summary>
/// Получение актуальной интеграционной инфокарты для спецификации
/// </summary>
/// <param name="specificationId">SP параметр спецификации</param>
/// <param name="specificationVersion">SP_VERSION параметр спецификации</param>
/// <param name="locationId">Id локации, от которой отправляется изменение</param>
/// <returns>Актуальная интеграционная инфокарта спецификации</returns>
Task<RndtSpIc?> GetSpecificationInfoCardAsync(int specificationId, int specificationVersion, int locationId);
/// <summary>
/// Обновление параметров интеграционной инфокарты для спецификации
/// </summary>
/// <param name="infoCard">Инфокарта спецификация, параметры которой необходимо обновить</param>
/// <param name="updateParams">Ключ значение, где ключ - наименование параметра, а значение - данные необходимые подставить</param>
/// <returns>True - если обновление параметров прошло успешно, в противном случае - False</returns>
Task<bool> UpdateSpecificationInfoCardAsync(RndtSpIc infoCard, Dictionary<string, string> updateParams);
/// <summary>
/// Получение актуального параметра спецификации по наименованию
/// </summary>
/// <param name="attributeName">Наименование параметра</param>
/// <returns>Актуальный параметр спецификации</returns>
Task<RndtAu?> GetActiveSpecificationAttributeAsync(string attributeName);
/// <summary>
/// Получение спецификации
/// </summary>
/// <param name="specificationId">Id спецификации</param>
/// <param name="specificationVersion">Версия спецификации</param>
/// <returns>Спецификациия по заданным параметрам</returns>
Task<RndtSp?> GetSpecificationAsync(int specificationId, int specificationVersion);
/// <summary>
/// Обновление/Создание атрибута спецификации
/// </summary>
/// <param name="specification">Объект спецификации</param>
/// <param name="actualSpecificationAttribute">Актуальаный атрибут спецификации</param>
/// <param name="value">Записываемое значение в атрибут</param>
/// <returns>True - если обновление параметров прошло успешно, в противном случае - False</returns>
Task<bool> UpdateAttributeAsync(RndtSp specification, RndtAu actualSpecificationAttribute, string value);
/// <summary>
/// Получение пробы
/// </summary>
/// <param name="sampleId"></param>
/// <returns>Проба по указанному Id</returns>
Task<RndtSc?> GetSampleAsync(int sampleId);
/// <summary>
/// Получение актуальной интеграционной инфокарты пробы
/// </summary>
/// <param name="sampleId">Уникальный идентификатор пробы</param>
/// <returns></returns>
Task<RndtScIc?> GetSampleInfoCardAsync(int sampleId);
/// <summary>
/// Обновление параметров интеграционной инфокарты для пробы
/// </summary>
/// <param name="infoCard">Инфокарта пробы, параметры которой необходимо обновить</param>
/// <param name="updateParams">Ключ значение, где ключ - наименование параметра, а значение - данные необходимые подставить</param>
/// <returns>True - если обновление параметров прошло успешно, в противном случае - False</returns>
Task<bool> UpdateSampleInfoCardAsync(RndtScIc infoCard, Dictionary<string, string> updateParams);
/// <summary>
/// Сохраняет логи касаемые метода в базу данных
/// </summary>
/// <param name="methodId">Уникальный идентификатор</param>
/// <param name="methodVersion">Версия метода</param>
/// <param name="statusCode">Код запроса успешный/неуспешный</param>
/// <param name="statusText">Сообщение запроса</param>
/// <returns></returns>
Task<bool> SaveMethodLog(decimal methodId, decimal methodVersion, string statusCode, string statusText);
/// <summary>
/// Сохраняет логи касаемые параметра в базу данных
/// </summary>
/// <param name="parameterId">Уникальный идентификатор</param>
/// <param name="parameterVersion">Версия параметра</param>
/// <param name="statusCode">Код запроса успешный/неуспешный</param>
/// <param name="statusText">Сообщение запроса</param>
/// <returns></returns>
Task<bool> SaveParameterLog(decimal parameterId, decimal parameterVersion, string statusCode, string statusText);
}
This diff is collapsed.
{
"LogFolder": "C:\\111",
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"NLog": {
"internalLogLevel": "Info",
"throwConfigExceptions": true,
"internalLogFile": "C:\\111\\temp\\internal-nlog.txt",
"extensions": [
{ "assembly": "NLog.Web" },
{ "assembly": "NLog.Extensions.Logging" }
],
"targets": {
"allfile": {
"type": "File",
"fileName": "C:\\111\\temp\\nlog-all-${shortdate}.log",
"layout": "${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}"
},
"requests-web": {
"type": "File",
"fileName": "C:\\111\\temp\\requests\\${shortdate}\\nlog-requests-${mdc:RequestGuid}.log",
"layout": "${longdate}|${uppercase:${level}}|${newline}${message}"
}
},
"rules": [
{
"logger": "*",
"minLevel": "Trace",
"writeTo": "allfile"
},
{
"logger": "ProfitGroup.SampleNotifyService.*",
"minLevel": "Trace",
"writeTo": "requests-web"
},
{
"logger": "ProfitGroup.SampleNotifyService.Core.Auth.*",
"minLevel": "Trace",
"writeTo": "requests-web"
}
]
},
"AllowedHosts": "*",
"ConnectionStrings": {
"RnDConnection": "Data Source=LLK-DEV;Initial Catalog=OpcenterRDnL;User ID=RnDAdmin;Password=pass@word1;TrustServerCertificate=True;"
}
}
{
"CodeGenerationMode": 2,
"ContextClassName": "RDnLDatabaseContext",
"ContextNamespace": null,
"DefaultDacpacSchema": null,
"FilterSchemas": false,
"IncludeConnectionString": false,
"ModelNamespace": null,
"OutputContextPath": null,
"OutputPath": "Core\/Data\/Entities",
"PreserveCasingWithRegex": true,
"ProjectRootNamespace": "ProfitGroup.SampleNotifyService.Data",
"Schemas": null,
"SelectedHandlebarsLanguage": 0,
"SelectedToBeGenerated": 0,
"T4TemplatePath": null,
"Tables": [
{
"Name": "[RndSuite].[ProfITS4MtLog]",
"ObjectType": 0
},
{
"Name": "[RndSuite].[ProfITS4PrLog]",
"ObjectType": 0
},
{
"Name": "[RndSuite].[RndtAu]",
"ObjectType": 0
},
{
"ExcludedColumns": [
"BASE_QUANTITY",
"UOM",
"YIELD",
"CONV_FACTOR",
"TO_UNIT",
"CALC_FLAG",
"MIN_QTY",
"LOG_HS",
"MAX_QTY",
"PLANT_EFFECTIVE_DATE",
"LY",
"LY_VERSION"
],
"Name": "[RndSuite].[RndtBomHeader]",
"ObjectType": 0
},
{
"Name": "[RndSuite].[RndtSc]",
"ObjectType": 0
},
{
"Name": "[RndSuite].[RndtScIc]",
"ObjectType": 0
},
{
"Name": "[RndSuite].[RndtScIi]",
"ObjectType": 0
},
{
"Name": "[RndSuite].[RndtSp]",
"ObjectType": 0
},
{
"Name": "[RndSuite].[RndtSpAu]",
"ObjectType": 0
},
{
"Name": "[RndSuite].[RndtSpIc]",
"ObjectType": 0
},
{
"Name": "[RndSuite].[RndtSpIi]",
"ObjectType": 0
}
],
"UiHint": "llk-dev.OpcenterRDnL.dbo",
"UncountableWords": null,
"UseBoolPropertiesWithoutDefaultSql": false,
"UseDatabaseNames": true,
"UseDateOnlyTimeOnly": false,
"UseDbContextSplitting": true,
"UseDecimalDataAnnotationForSprocResult": true,
"UseFluentApiOnly": true,
"UseHandleBars": false,
"UseHierarchyId": false,
"UseInflector": false,
"UseLegacyPluralizer": false,
"UseManyToManyEntity": false,
"UseNoDefaultConstructor": false,
"UseNoNavigations": false,
"UseNoObjectFilter": false,
"UseNodaTime": false,
"UseNullableReferences": false,
"UseSchemaFolders": false,
"UseSchemaNamespaces": false,
"UseSpatial": false,
"UseT4": false
}
\ No newline at end of file
using RnD.API;
using RnD.Attributes;
using RnD.Common.Enums;
using RnD.Common.Model;
using RnD.Common.Model.ActionBarButtons;
using RnD.CustomFunctionTypes;
using RnD.Model;
using System.Collections.Generic;
namespace ProfitGroup.SampleRequest.Actions
{
[CustomFunction("ActionSampleRequest")]
public class SampleRequestAction : AdvancedCustomFunction, ICustomActionBarButton
{
public SampleRequestAction(IAPI aAPI) : base(aAPI)
{
}
public ActionBarButtonMetadata GetActionBarButtonMetadata()
{
var lResult = new ActionBarButtonMetadata
{
Description = "Запросить повторную пробу",
IconClass = "icon-cmdTestRunAdd24",
Position = 8,
DropdownIdentifier = "Повторная проба",
DropdownIconClass = "icon-cmdTestRunAdd24"
};
lResult.IsVisibleWhen.Add(ActionBarButtonVisibility.Sample);
return lResult;
}
public ActionBarButtonResult Execute(List<ICustomizationObject> aCustomisationObject)
{
var lResult = new ValidationResult();
var result = new ActionBarButtonResult
{
Message = "Запрос успешно отправлен",
MessageType = MessageType.Information,
JsFunction = "console.log('Success')",
Refresh = false,
};
return result;
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DD05EABA-B6DA-4BE0-8B53-9D659D5CC786}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ProfitGroup.SampleRequest</RootNamespace>
<AssemblyName>ProfitGroup.SampleRequest</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<RunPostBuildEvent>Always</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Reference Include="RnD.BusinessLayer.EF">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.BusinessLayer.EF.dll</HintPath>
</Reference>
<Reference Include="RnD.BusinessLayer.Interfaces">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.BusinessLayer.Interfaces.dll</HintPath>
</Reference>
<Reference Include="RnD.Common">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.Common.dll</HintPath>
</Reference>
<Reference Include="RnD.Customizations.API">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.Customizations.API.dll</HintPath>
</Reference>
<Reference Include="RnD.Customizations.Interfaces">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.Customizations.Interfaces.dll</HintPath>
</Reference>
<Reference Include="RnD.Model.EF">
<HintPath>..\..\..\..\..\..\..\inetpub\wwwroot\OpcenterRDnLGIL\bin\RnD.Model.EF.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Actions\SampleRequestAction.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
using System.Reflection;
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("ProfitGroup.SampleRequest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ProfitGroup.SampleRequest")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[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("DD05EABA-B6DA-4BE0-8B53-9D659D5CC786")]
// 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")]
\ No newline at end of file
using System.Runtime.Serialization;
using System.ServiceModel;
namespace ProfitGroup.SampleService.Contracts
{
[ServiceContract]
public interface ISampleService
{
[OperationContract]
CreateSampleDto CreateSample(CreateSampleDto sampleDto);
}
[DataContract]
public class CreateSampleDto
{
string place;
[DataMember]
public string Place
{
get { return place; }
set { place = value; }
}
}
}
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{BBAB7721-F208-4023-8045-58D0BE835123}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ProfitGroup.SampleService.Contracts</RootNamespace>
<AssemblyName>ProfitGroup.SampleService.Contracts</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<WcfConfigValidationEnabled>True</WcfConfigValidationEnabled>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="RnD.BusinessLayer.Interfaces, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Content Include="SampleService.svc" />
<Content Include="Web.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="SampleService.svc.cs">
<DependentUpon>SampleService.svc</DependentUpon>
</Compile>
<Compile Include="ISampleService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
</ItemGroup>
<ItemGroup>
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ProfitGroup.Rdnl.Extensions\ProfitGroup.Rdnl.Extensions.csproj">
<Project>{ce66275c-0543-46d5-8df7-0ec58562f408}</Project>
<Name>ProfitGroup.Rdnl.Extensions</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>59447</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:59447/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
using System.Reflection;
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("ProfitGroup.SampleService.Contracts")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ProfitGroup.SampleService.Contracts")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[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("bbab7721-f208-4023-8045-58d0be835123")]
// 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 Revision and Build Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<%@ ServiceHost Language="C#" Debug="true" Service="ProfitGroup.SampleService.Contracts.SampleService" CodeBehind="SampleService.svc.cs" %>
\ No newline at end of file
using ProfitGroup.Rdnl.Extensions;
namespace ProfitGroup.SampleService.Contracts
{
public class SampleService : ISampleService
{
private readonly RDnLManager RDnLManager;
public SampleService()
{
//RDnLManager = new RDnLManager("RndConnection", "scCreate");
//RDnLManager.Initialize();
}
public CreateSampleDto CreateSample(CreateSampleDto sampleDto)
{
return null;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>
\ No newline at end of file
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true"/>
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.8"/>
<httpRuntime targetFramework="4.8"/>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true"/>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Ninject" publicKeyToken="C7192DC5380945E7" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.3.4.0" newVersion="3.3.4.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.6.33513.286
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProfitGroup.SampleService.Contracts", "ProfitGroup.SampleService.Contracts\ProfitGroup.SampleService.Contracts.csproj", "{BBAB7721-F208-4023-8045-58D0BE835123}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProfitGroup.Rdnl.Extensions", "ProfitGroup.Rdnl.Extensions\ProfitGroup.Rdnl.Extensions.csproj", "{CE66275C-0543-46D5-8DF7-0EC58562F408}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProfitGroup.SampleNotifyService", "ProfitGroup.SampleNotifyService\ProfitGroup.SampleNotifyService.csproj", "{9CC9E1EE-03E6-44BA-A461-7C2034921970}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProfitGroup.SampleRequest", "ProfitGroup.SampleRequest\ProfitGroup.SampleRequest.csproj", "{DD05EABA-B6DA-4BE0-8B53-9D659D5CC786}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Notify", "Notify", "{FFAC33FE-3829-4798-8834-F50E0E5561AE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SampleCreating", "SampleCreating", "{FE108CFB-3313-4473-B289-A8A951FDD2F2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SoapTemplateContracts", "SoapTemplateContracts", "{02CB70DB-8A9F-47D4-A827-DBC05197EC33}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{FA5EF8C5-048D-43DC-B5DA-35E73DAFB41E}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProfitGroup.SampleService", "ProfitGroup.SampleService\ProfitGroup.SampleService.csproj", "{D7981DA6-D21B-4BB9-9F26-C6DC606B18C0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BBAB7721-F208-4023-8045-58D0BE835123}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BBAB7721-F208-4023-8045-58D0BE835123}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BBAB7721-F208-4023-8045-58D0BE835123}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BBAB7721-F208-4023-8045-58D0BE835123}.Release|Any CPU.Build.0 = Release|Any CPU
{CE66275C-0543-46D5-8DF7-0EC58562F408}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CE66275C-0543-46D5-8DF7-0EC58562F408}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CE66275C-0543-46D5-8DF7-0EC58562F408}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CE66275C-0543-46D5-8DF7-0EC58562F408}.Release|Any CPU.Build.0 = Release|Any CPU
{9CC9E1EE-03E6-44BA-A461-7C2034921970}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9CC9E1EE-03E6-44BA-A461-7C2034921970}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9CC9E1EE-03E6-44BA-A461-7C2034921970}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9CC9E1EE-03E6-44BA-A461-7C2034921970}.Release|Any CPU.Build.0 = Release|Any CPU
{DD05EABA-B6DA-4BE0-8B53-9D659D5CC786}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD05EABA-B6DA-4BE0-8B53-9D659D5CC786}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD05EABA-B6DA-4BE0-8B53-9D659D5CC786}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DD05EABA-B6DA-4BE0-8B53-9D659D5CC786}.Release|Any CPU.Build.0 = Release|Any CPU
{D7981DA6-D21B-4BB9-9F26-C6DC606B18C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D7981DA6-D21B-4BB9-9F26-C6DC606B18C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7981DA6-D21B-4BB9-9F26-C6DC606B18C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7981DA6-D21B-4BB9-9F26-C6DC606B18C0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{BBAB7721-F208-4023-8045-58D0BE835123} = {02CB70DB-8A9F-47D4-A827-DBC05197EC33}
{CE66275C-0543-46D5-8DF7-0EC58562F408} = {FE108CFB-3313-4473-B289-A8A951FDD2F2}
{9CC9E1EE-03E6-44BA-A461-7C2034921970} = {FFAC33FE-3829-4798-8834-F50E0E5561AE}
{DD05EABA-B6DA-4BE0-8B53-9D659D5CC786} = {FE108CFB-3313-4473-B289-A8A951FDD2F2}
{D7981DA6-D21B-4BB9-9F26-C6DC606B18C0} = {FE108CFB-3313-4473-B289-A8A951FDD2F2}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A36EC940-63DB-4892-8659-8EC0F6E8C8B0}
EndGlobalSection
EndGlobal
using System.Web;
using System.Web.Optimization;
namespace ProfitGroup.SampleService
{
public class BundleConfig
{
// For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new Bundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
}
}
}
using System.Web;
using System.Web.Mvc;
namespace ProfitGroup.SampleService
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace ProfitGroup.SampleService
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}
using NLog;
using NLog.Config;
using ProfitGroup.Rdnl.Extensions;
using ProfitGroup.SampleService.Core.Services;
using RnD.API;
using RnD.BusinessLayer.EF.Factory;
using RnD.BusinessLayer.EF.Interfaces;
using RnD.Model.EF;
using System;
using System.IO;
using System.Web.Http;
using Unity;
using Unity.Injection;
using Unity.Lifetime;
using Unity.WebApi;
namespace ProfitGroup.SampleService
{
public static class UnityConfig
{
public static void RegisterComponents()
{
var container = new UnityContainer();
var loggerConfig = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "nlog.config");
LogManager.Setup().LoadConfigurationFromFile(loggerConfig);
LogManager.Configuration = new XmlLoggingConfiguration(loggerConfig);
container.RegisterInstance(typeof(ILogger), LogManager.GetCurrentClassLogger());
// container.RegisterInstance(typeof(RDnLManager), new RDnLManager("OpcenterRDnL", "scCreate").Initialize(), lifetimeManager: new TransientLifetimeManager());
container.RegisterType<RDnLManager>(
new TransientLifetimeManager(),
new InjectionConstructor("OpcenterRDnL", "scCreate")
);
container.RegisterType<IKSSSInfoService, KsssInfoService>();
container.RegisterType<ISampleService, Core.Services.SampleService>();
container.RegisterInstance(typeof(SampleConfirmationService));
var manager = container.Resolve<RDnLManager>();
container.RegisterInstance(typeof(API), new API(new BusinessObjectFactory(aConnection: (ISession<RnDConnection>)manager.EventAwareObjectFactory.FactorySession)));
GlobalConfiguration.Configuration.DependencyResolver = new UnityDependencyResolver(container);
}
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
namespace ProfitGroup.SampleService
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);
}
}
}
using System;
using System.Text;
using System.Web;
using System.Web.Http.Description;
namespace ProfitGroup.SampleService.Areas.HelpPage
{
public static class ApiDescriptionExtensions
{
/// <summary>
/// Generates an URI-friendly ID for the <see cref="ApiDescription"/>. E.g. "Get-Values-id_name" instead of "GetValues/{id}?name={name}"
/// </summary>
/// <param name="description">The <see cref="ApiDescription"/>.</param>
/// <returns>The ID as a string.</returns>
public static string GetFriendlyId(this ApiDescription description)
{
string path = description.RelativePath;
string[] urlParts = path.Split('?');
string localPath = urlParts[0];
string queryKeyString = null;
if (urlParts.Length > 1)
{
string query = urlParts[1];
string[] queryKeys = HttpUtility.ParseQueryString(query).AllKeys;
queryKeyString = String.Join("_", queryKeys);
}
StringBuilder friendlyPath = new StringBuilder();
friendlyPath.AppendFormat("{0}-{1}",
description.HttpMethod.Method,
localPath.Replace("/", "-").Replace("{", String.Empty).Replace("}", String.Empty));
if (queryKeyString != null)
{
friendlyPath.AppendFormat("_{0}", queryKeyString.Replace('.', '-'));
}
return friendlyPath.ToString();
}
}
}
\ No newline at end of file
// Uncomment the following to provide samples for PageResult<T>. Must also add the Microsoft.AspNet.WebApi.OData
// package to your project.
////#define Handle_PageResultOfT
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Net.Http.Headers;
using System.Reflection;
using System.Web;
using System.Web.Http;
#if Handle_PageResultOfT
using System.Web.Http.OData;
#endif
namespace ProfitGroup.SampleService.Areas.HelpPage
{
/// <summary>
/// Use this class to customize the Help Page.
/// For example you can set a custom <see cref="System.Web.Http.Description.IDocumentationProvider"/> to supply the documentation
/// or you can provide the samples for the requests/responses.
/// </summary>
public static class HelpPageConfig
{
[SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters",
MessageId = "ProfitGroup.SampleService.Areas.HelpPage.TextSample.#ctor(System.String)",
Justification = "End users may choose to merge this string with existing localized resources.")]
[SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly",
MessageId = "bsonspec",
Justification = "Part of a URI.")]
public static void Register(HttpConfiguration config)
{
//// Uncomment the following to use the documentation from XML documentation file.
//config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath("~/App_Data/XmlDocument.xml")));
//// Uncomment the following to use "sample string" as the sample for all actions that have string as the body parameter or return type.
//// Also, the string arrays will be used for IEnumerable<string>. The sample objects will be serialized into different media type
//// formats by the available formatters.
//config.SetSampleObjects(new Dictionary<Type, object>
//{
// {typeof(string), "sample string"},
// {typeof(IEnumerable<string>), new string[]{"sample 1", "sample 2"}}
//});
// Extend the following to provide factories for types not handled automatically (those lacking parameterless
// constructors) or for which you prefer to use non-default property values. Line below provides a fallback
// since automatic handling will fail and GeneratePageResult handles only a single type.
#if Handle_PageResultOfT
config.GetHelpPageSampleGenerator().SampleObjectFactories.Add(GeneratePageResult);
#endif
// Extend the following to use a preset object directly as the sample for all actions that support a media
// type, regardless of the body parameter or return type. The lines below avoid display of binary content.
// The BsonMediaTypeFormatter (if available) is not used to serialize the TextSample object.
config.SetSampleForMediaType(
new TextSample("Binary JSON content. See http://bsonspec.org for details."),
new MediaTypeHeaderValue("application/bson"));
//// Uncomment the following to use "[0]=foo&[1]=bar" directly as the sample for all actions that support form URL encoded format
//// and have IEnumerable<string> as the body parameter or return type.
//config.SetSampleForType("[0]=foo&[1]=bar", new MediaTypeHeaderValue("application/x-www-form-urlencoded"), typeof(IEnumerable<string>));
//// Uncomment the following to use "1234" directly as the request sample for media type "text/plain" on the controller named "Values"
//// and action named "Put".
//config.SetSampleRequest("1234", new MediaTypeHeaderValue("text/plain"), "Values", "Put");
//// Uncomment the following to use the image on "../images/aspNetHome.png" directly as the response sample for media type "image/png"
//// on the controller named "Values" and action named "Get" with parameter "id".
//config.SetSampleResponse(new ImageSample("../images/aspNetHome.png"), new MediaTypeHeaderValue("image/png"), "Values", "Get", "id");
//// Uncomment the following to correct the sample request when the action expects an HttpRequestMessage with ObjectContent<string>.
//// The sample will be generated as if the controller named "Values" and action named "Get" were having string as the body parameter.
//config.SetActualRequestType(typeof(string), "Values", "Get");
//// Uncomment the following to correct the sample response when the action returns an HttpResponseMessage with ObjectContent<string>.
//// The sample will be generated as if the controller named "Values" and action named "Post" were returning a string.
//config.SetActualResponseType(typeof(string), "Values", "Post");
}
#if Handle_PageResultOfT
private static object GeneratePageResult(HelpPageSampleGenerator sampleGenerator, Type type)
{
if (type.IsGenericType)
{
Type openGenericType = type.GetGenericTypeDefinition();
if (openGenericType == typeof(PageResult<>))
{
// Get the T in PageResult<T>
Type[] typeParameters = type.GetGenericArguments();
Debug.Assert(typeParameters.Length == 1);
// Create an enumeration to pass as the first parameter to the PageResult<T> constuctor
Type itemsType = typeof(List<>).MakeGenericType(typeParameters);
object items = sampleGenerator.GetSampleObject(itemsType);
// Fill in the other information needed to invoke the PageResult<T> constuctor
Type[] parameterTypes = new Type[] { itemsType, typeof(Uri), typeof(long?), };
object[] parameters = new object[] { items, null, (long)ObjectGenerator.DefaultCollectionSize, };
// Call PageResult(IEnumerable<T> items, Uri nextPageLink, long? count) constructor
ConstructorInfo constructor = type.GetConstructor(parameterTypes);
return constructor.Invoke(parameters);
}
}
return null;
}
#endif
}
}
\ No newline at end of file
using System;
using System.Web.Http;
using System.Web.Mvc;
using ProfitGroup.SampleService.Areas.HelpPage.ModelDescriptions;
using ProfitGroup.SampleService.Areas.HelpPage.Models;
namespace ProfitGroup.SampleService.Areas.HelpPage.Controllers
{
/// <summary>
/// The controller that will handle requests for the help page.
/// </summary>
public class HelpController : Controller
{
private const string ErrorViewName = "Error";
public HelpController()
: this(GlobalConfiguration.Configuration)
{
}
public HelpController(HttpConfiguration config)
{
Configuration = config;
}
public HttpConfiguration Configuration { get; private set; }
public ActionResult Index()
{
ViewBag.DocumentationProvider = Configuration.Services.GetDocumentationProvider();
return View(Configuration.Services.GetApiExplorer().ApiDescriptions);
}
public ActionResult Api(string apiId)
{
if (!String.IsNullOrEmpty(apiId))
{
HelpPageApiModel apiModel = Configuration.GetHelpPageApiModel(apiId);
if (apiModel != null)
{
return View(apiModel);
}
}
return View(ErrorViewName);
}
public ActionResult ResourceModel(string modelName)
{
if (!String.IsNullOrEmpty(modelName))
{
ModelDescriptionGenerator modelDescriptionGenerator = Configuration.GetModelDescriptionGenerator();
ModelDescription modelDescription;
if (modelDescriptionGenerator.GeneratedModels.TryGetValue(modelName, out modelDescription))
{
return View(modelDescription);
}
}
return View(ErrorViewName);
}
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment