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 14,263 5/16/2022
22.4.0 13,765 4/12/2022
22.3.0 10,105 3/21/2022
22.2.0 15,795 2/15/2022
22.1.0 16,017 1/18/2022
21.12.0 7,512 12/17/2021
21.11.0 11,427 11/13/2021
21.10.1 8,492 10/21/2021
21.10.0 8,539 10/14/2021
21.9.0 10,193 9/15/2021
21.8.0 9,676 8/16/2021
21.7.0 11,532 7/16/2021
21.6.0 8,961 6/16/2021
21.5.0 14,252 5/12/2021
21.4.0 9,911 4/14/2021
21.3.0 8,992 3/15/2021
21.2.0 9,001 2/12/2021
21.1.0 11,421 1/21/2021
20.12.0 10,627 12/18/2020
20.11.0 8,945 11/16/2020
20.10.0 8,550 10/19/2020
20.9.0 9,464 9/17/2020
20.8.0 6,490 8/13/2020
20.7.0 10,760 7/16/2020
20.6.0 11,557 6/15/2020
20.5.0 8,317 5/19/2020
20.4.0 8,416 4/20/2020
20.3.0 6,169 3/16/2020
20.2.0 6,654 2/14/2020
20.1.0 6,212 1/17/2020
19.12.0 4,629 12/13/2019
19.11.0 5,045 11/19/2019
19.10.0 3,224 10/16/2019
19.9.0 3,003 9/25/2019
19.8.0 2,051 8/30/2019
19.7.0 2,798 7/25/2019
19.6.0 2,569 6/26/2019
19.5.0 2,557 5/27/2019
19.4.1 2,555 5/7/2019