CodePorting.Native.Cs2Cpp.API 22.5.0

dotnet add package CodePorting.Native.Cs2Cpp.API --version 22.5.0                
NuGet\Install-Package CodePorting.Native.Cs2Cpp.API -Version 22.5.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodePorting.Native.Cs2Cpp.API" Version="22.5.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CodePorting.Native.Cs2Cpp.API --version 22.5.0                
#r "nuget: CodePorting.Native.Cs2Cpp.API, 22.5.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CodePorting.Native.Cs2Cpp.API as a Cake Addin
#addin nuget:?package=CodePorting.Native.Cs2Cpp.API&version=22.5.0

// Install CodePorting.Native.Cs2Cpp.API as a Cake Tool
#tool nuget:?package=CodePorting.Native.Cs2Cpp.API&version=22.5.0                

Description

CodePorting.Native Cs2Cpp is a framework capable of translating C# code to C++. The resulting code provides the same API original .Net code had and can run in the native (unmanaged) C++ environment.

CodePorting.Native.Cs2Cpp.API package contains a C++ Library with a substitution for .Net classes and some service code. The ported code is ultimately dependent on this component.

If you use the full CodePorting.Native Cs2Cpp package to translate your code, this library is already included in it, and you don't need to manage this dependency manually as the porter will generate CMake project files with proper references. However, if you're planning to distribute your ported code, providing the dependency on CodePorting.Native.Cs2Cpp.API Nuget package (where applicable) is the easiest way to do so. Alternatively, you may ask your clients to download respectful CodePorting.Native.Cs2Cpp packages from the CodePorting website.

Always make sure that the version of the porter used to translate your code matches the version of the CodePorting.Native.Cs2Cpp.API package you use. Failing to do so can result in compilation and/or runtime errors, since the API may change between the versions.

Usage

The types from this package can be used in the client's code to interact with the ported code. Please make sure to use proper smart pointer wrappers for class-like types. For more information, please refer to the product documentation.

#include <system/string.h>
#include <system/console.h>
#include <system/collections/list.h>
#include <MyPortedProject/MyPortedClass.h>

using namespace System;
using namespace System::Collections::Generic;
using namespace MyPortedProject;

int main(int, char*[])
{
    auto list = MakeObject<List<String>>();
    list->Add(u"Apple");
    list->Add(u"Banana");
    list->Add(u"Apricot");
    list->Sort();

    auto myobj = MakeObject<MyPortedClass>();
    list = myobj->Process(list);

    for (const auto &item : list)
        Console::WriteLine(item);
    return 0;
}

Resources

Product Compatible and additional computed target framework versions.
native native is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
22.5.0 16,521 5/16/2022
22.4.0 15,726 4/12/2022
22.3.0 11,536 3/21/2022
22.2.0 18,335 2/15/2022
22.1.0 18,319 1/18/2022
21.12.0 9,380 12/17/2021
21.11.0 14,192 11/13/2021
21.10.1 10,092 10/21/2021
21.10.0 9,904 10/14/2021
21.9.0 12,114 9/15/2021
21.8.0 12,255 8/16/2021
21.7.0 14,037 7/16/2021
21.6.0 10,962 6/16/2021
21.5.0 17,823 5/12/2021
21.4.0 12,461 4/14/2021
21.3.0 11,385 3/15/2021
21.2.0 10,905 2/12/2021
21.1.0 13,900 1/21/2021
20.12.0 12,965 12/18/2020
20.11.0 11,172 11/16/2020
20.10.0 11,019 10/19/2020
20.9.0 12,079 9/17/2020
20.8.0 8,670 8/13/2020
20.7.0 14,321 7/16/2020
20.6.0 15,556 6/15/2020
20.5.0 10,929 5/19/2020
20.4.0 11,463 4/20/2020
20.3.0 8,545 3/16/2020
20.2.0 8,680 2/14/2020
20.1.0 8,024 1/17/2020
19.12.0 5,428 12/13/2019
19.11.0 5,622 11/19/2019
19.10.0 3,858 10/16/2019
19.9.0 3,489 9/25/2019
19.8.0 2,611 8/30/2019
19.7.0 3,273 7/25/2019
19.6.0 3,093 6/26/2019
19.5.0 3,020 5/27/2019
19.4.1 3,107 5/7/2019