public void GetInfoByName(string name) { using (INativeInstance nameNative = UTF8Marshaler.CreateInstance(name)) { IntPtr exception = IntPtr.Zero; IntPtr result; #if ANYCPU if (NativeLibrary.Is64Bit) #endif #if WIN64 || ANYCPU result = NativeMethods.X64.MagickFormatInfo_GetInfoByName(nameNative.Instance, out exception); #endif #if ANYCPU else #endif #if !WIN64 || ANYCPU result = NativeMethods.X86.MagickFormatInfo_GetInfoByName(nameNative.Instance, out exception); #endif CheckException(exception); Instance = result; } }
public static void SetLogEvents(string?events) { using (var eventsNative = UTF8Marshaler.CreateInstance(events)) { #if PLATFORM_AnyCPU if (OperatingSystem.IsArm64) #endif #if PLATFORM_arm64 || PLATFORM_AnyCPU NativeMethods.ARM64.Magick_SetLogEvents(eventsNative.Instance); #endif #if PLATFORM_AnyCPU else if (OperatingSystem.Is64Bit) #endif #if PLATFORM_x64 || PLATFORM_AnyCPU NativeMethods.X64.Magick_SetLogEvents(eventsNative.Instance); #endif #if PLATFORM_AnyCPU else #endif #if PLATFORM_x86 || PLATFORM_AnyCPU NativeMethods.X86.Magick_SetLogEvents(eventsNative.Instance); #endif } }
public void SetTitle(string?value) { using (var valueNative = UTF8Marshaler.CreateInstance(value)) { #if PLATFORM_AnyCPU if (OperatingSystem.IsArm64) #endif #if PLATFORM_arm64 || PLATFORM_AnyCPU NativeMethods.ARM64.MontageSettings_SetTitle(Instance, valueNative.Instance); #endif #if PLATFORM_AnyCPU else if (OperatingSystem.Is64Bit) #endif #if PLATFORM_x64 || PLATFORM_AnyCPU NativeMethods.X64.MontageSettings_SetTitle(Instance, valueNative.Instance); #endif #if PLATFORM_AnyCPU else #endif #if PLATFORM_x86 || PLATFORM_AnyCPU NativeMethods.X86.MontageSettings_SetTitle(Instance, valueNative.Instance); #endif } }