$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
This file contains hidden or 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
public static class Enums | |
{ | |
public static IList<dynamic> ListFrom<T>() | |
{ | |
var list = new List<dynamic>(); | |
var enumType = typeof(T); | |
foreach (var o in Enum.GetValues(enumType)) | |
{ | |
list.Add(new |
This file contains hidden or 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
internal class Job : IDisposable | |
{ | |
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)] | |
static extern IntPtr CreateJobObject(IntPtr a, string lpName); | |
[DllImport("kernel32.dll")] | |
static extern bool SetInformationJobObject(IntPtr hJob, JobObjectInfoType infoType, IntPtr lpJobObjectInfo, UInt32 cbJobObjectInfoLength); | |
[DllImport("kernel32.dll", SetLastError = true)] | |
static extern bool AssignProcessToJobObject(IntPtr job, IntPtr process); |
OlderNewer