CodePorting.Native.Cs2Cpp.API 22.5.0

Install-Package CodePorting.Native.Cs2Cpp.API -Version 22.5.0
dotnet add package CodePorting.Native.Cs2Cpp.API --version 22.5.0
<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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CodePorting.Native.Cs2Cpp.API, 22.5.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. 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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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 Versions
native native
Compatible target framework(s)
Additional computed target framework(s)
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 1,880 5/16/2022
22.4.0 1,914 4/12/2022
22.3.0 1,468 3/21/2022
22.2.0 2,067 2/15/2022
22.1.0 2,394 1/18/2022
21.12.0 1,194 12/17/2021
21.11.0 2,107 11/13/2021
21.10.1 1,608 10/21/2021
21.10.0 1,574 10/14/2021
21.9.0 2,339 9/15/2021
21.8.0 2,679 8/16/2021
21.7.0 2,967 7/16/2021
21.6.0 2,006 6/16/2021
21.5.0 3,156 5/12/2021
21.4.0 2,139 4/14/2021
21.3.0 1,725 3/15/2021
21.2.0 1,845 2/12/2021
21.1.0 2,326 1/21/2021
20.12.0 2,388 12/18/2020
20.11.0 2,168 11/16/2020
20.10.0 2,377 10/19/2020
20.9.0 2,489 9/17/2020
20.8.0 1,577 8/13/2020
20.7.0 2,577 7/16/2020
20.6.0 2,348 6/15/2020
20.5.0 1,701 5/19/2020
20.4.0 1,809 4/20/2020
20.3.0 1,399 3/16/2020
20.2.0 1,460 2/14/2020
20.1.0 1,322 1/17/2020
19.12.0 969 12/13/2019
19.11.0 1,050 11/19/2019
19.10.0 768 10/16/2019
19.9.0 615 9/25/2019
19.8.0 455 8/30/2019
19.7.0 474 7/25/2019
19.6.0 480 6/26/2019
19.5.0 496 5/27/2019
19.4.1 501 5/7/2019