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, 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

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 4,734 5/16/2022
22.4.0 4,469 4/12/2022
22.3.0 3,159 3/21/2022
22.2.0 5,051 2/15/2022
22.1.0 5,457 1/18/2022
21.12.0 1,952 12/17/2021
21.11.0 3,503 11/13/2021
21.10.1 2,461 10/21/2021
21.10.0 2,350 10/14/2021
21.9.0 3,543 9/15/2021
21.8.0 3,864 8/16/2021
21.7.0 4,092 7/16/2021
21.6.0 2,770 6/16/2021
21.5.0 4,497 5/12/2021
21.4.0 2,931 4/14/2021
21.3.0 2,408 3/15/2021
21.2.0 2,656 2/12/2021
21.1.0 3,572 1/21/2021
20.12.0 3,321 12/18/2020
20.11.0 2,873 11/16/2020
20.10.0 3,043 10/19/2020
20.9.0 3,144 9/17/2020
20.8.0 1,923 8/13/2020
20.7.0 3,542 7/16/2020
20.6.0 3,217 6/15/2020
20.5.0 2,241 5/19/2020
20.4.0 2,324 4/20/2020
20.3.0 1,714 3/16/2020
20.2.0 1,769 2/14/2020
20.1.0 1,600 1/17/2020
19.12.0 1,121 12/13/2019
19.11.0 1,180 11/19/2019
19.10.0 868 10/16/2019
19.9.0 690 9/25/2019
19.8.0 507 8/30/2019
19.7.0 524 7/25/2019
19.6.0 530 6/26/2019
19.5.0 547 5/27/2019
19.4.1 551 5/7/2019