ImageMagick.MontageSettings.CreateInstance C# (CSharp) Метод

CreateInstance() статический приватный Метод

static private CreateInstance ( MontageSettings instance ) : INativeInstance
instance MontageSettings
Результат INativeInstance
    internal static INativeInstance CreateInstance(MontageSettings instance)
    {
      if (instance == null)
        return NativeInstance.Zero;
      return instance.CreateNativeInstance();
    }
  }

Usage Example

 public IntPtr Montage(IMagickImage image, IMontageSettings <QuantumType> settings)
 {
     using (INativeInstance settingsNative = MontageSettings.CreateInstance(settings))
     {
         IntPtr exception = IntPtr.Zero;
         IntPtr result;
         #if PLATFORM_AnyCPU
         if (OperatingSystem.Is64Bit)
         #endif
         #if PLATFORM_x64 || PLATFORM_AnyCPU
         result = NativeMethods.X64.MagickImageCollection_Montage(image.GetInstance(), settingsNative.Instance, out exception);
         #endif
         #if PLATFORM_AnyCPU
         else
         #endif
         #if PLATFORM_x86 || PLATFORM_AnyCPU
         result = NativeMethods.X86.MagickImageCollection_Montage(image.GetInstance(), settingsNative.Instance, out exception);
         #endif
         var magickException = MagickExceptionHelper.Create(exception);
         if (magickException == null)
         {
             return(result);
         }
         if (magickException is MagickErrorException)
         {
             if (result != IntPtr.Zero)
             {
                 Dispose(result);
             }
             throw magickException;
         }
         RaiseWarning(magickException);
         return(result);
     }
 }
All Usage Examples Of ImageMagick.MontageSettings::CreateInstance