public static void Init(IntPtr hmodule) { ourSetFilterState = Marshal.GetDelegateForFunctionPointer <TriBool>(GetProcAddress(hmodule, nameof(SetFilteringState))); ourSetTess = Marshal.GetDelegateForFunctionPointer <OneFloat>(GetProcAddress(hmodule, nameof(SetMaxTesselationPower))); ourSetLoops = Marshal.GetDelegateForFunctionPointer <OneInt>(GetProcAddress(hmodule, nameof(SetLoopLimit))); ourSetGeom = Marshal.GetDelegateForFunctionPointer <OneInt>(GetProcAddress(hmodule, nameof(SetGeometryLimit))); }
// Class with primitive data // You can provide arguments to this function. For example // You can provide a bool called allowBadData to adjust if this function will return bad data or not. // Ideally you should create a generic function that takes in any Collection or a Class and returns // A new array populated with bad values like null and default public static OneInt[] OneIntValues() { OneInt[] oneInts = new OneInt[5]; for (int i = 0; i < 5; i++) { oneInts[i] = new OneInt(IntValues[i]); } return(oneInts); }
public ClassWithReferenceToOneIntAndOneInt(OneInt oneInt, int x) { this.oneInt = oneInt; this.x = x; }
public void TestOneInt(OneInt oneInt, Predicate <OneInt> validator) { Assert.IsTrue(validator(oneInt)); }
public static int ChangeInt(OneInt MyC, int x) { return(MyC(x)); }