This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#define DLLEXPORT extern "C" __declspec(dllexport) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<PlatformTarget>x64</PlatformTarget> | |
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static class PInvoke | |
{ | |
private const string ModuleLocation = "Unmanaged/PInvokeInterop.dll"; | |
[DllImport(ModuleLocation, SetLastError = true)] | |
public static extern void PrintToDo(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "global.h" | |
DLLEXPORT void PrintToDo() | |
{ | |
std::cout << "TODO!" << std::endl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get all keys from enumeration. | |
*/ | |
public static keys(enumType: object) { | |
const members = Object.keys(enumType);<br /> let keys: string[]; | |
if (!EnumHelpers.isNumeral(enumType)) { | |
keys = members; | |
} else { | |
keys = []; | |
members.forEach(x => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Size; | |
(function (Size) { | |
Size[Size["One"] = 1] = "One"; | |
Size["All"] = "all"; | |
})(Size || (Size = {})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Size { | |
One = 1, | |
All = "all" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check to numeral enumeration. | |
*/ | |
private static isNumeral(enumType: object) { | |
const members = Object.keys(enumType); | |
if (!members.some((x) => true)) { | |
throw new TypeError("Invalid enumeration type."); | |
} | |
let parsedCount = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Names; | |
(function (Names) { | |
Names["Alex"] = "a"; | |
Names["Denis"] = "d"; | |
})(Names || (Names = {})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Names { | |
Alex = "a", | |
Denis = "d" | |
} |
NewerOlder