"Fossies" - the Fresh Open Source Software Archive

Member "xapian-bindings-1.4.14/csharp/generated-csharp/FieldProcessor.cs" (23 Nov 2019, 3366 Bytes) of package /linux/www/xapian-bindings-1.4.14.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C# source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 //------------------------------------------------------------------------------
    2 // <auto-generated />
    3 //
    4 // This file was automatically generated by SWIG (http://www.swig.org).
    5 // Version 3.0.13
    6 //
    7 // Do not make changes to this file unless you know what you are doing--modify
    8 // the SWIG interface file instead.
    9 //------------------------------------------------------------------------------
   10 
   11 namespace Xapian {
   12 
   13 public class FieldProcessor : global::System.IDisposable {
   14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
   15   protected bool swigCMemOwn;
   16 
   17   internal FieldProcessor(global::System.IntPtr cPtr, bool cMemoryOwn) {
   18     swigCMemOwn = cMemoryOwn;
   19     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
   20   }
   21 
   22   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FieldProcessor obj) {
   23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
   24   }
   25 
   26   ~FieldProcessor() {
   27     Dispose();
   28   }
   29 
   30   public virtual void Dispose() {
   31     lock(this) {
   32       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
   33         if (swigCMemOwn) {
   34           swigCMemOwn = false;
   35           XapianPINVOKE.delete_FieldProcessor(swigCPtr);
   36         }
   37         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
   38       }
   39       global::System.GC.SuppressFinalize(this);
   40     }
   41   }
   42 
   43   public FieldProcessor() : this(XapianPINVOKE.new_FieldProcessor(), true) {
   44     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   45     SwigDirectorConnect();
   46   }
   47 
   48   public virtual Query Apply(string str) {
   49     Query ret = new Query(XapianPINVOKE.FieldProcessor_Apply(swigCPtr, str), true);
   50     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   51     return ret;
   52   }
   53 
   54   public FieldProcessor Release() {
   55     global::System.IntPtr cPtr = XapianPINVOKE.FieldProcessor_Release(swigCPtr);
   56     FieldProcessor ret = (cPtr == global::System.IntPtr.Zero) ? null : new FieldProcessor(cPtr, false);
   57     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   58     return ret;
   59   }
   60 
   61   private void SwigDirectorConnect() {
   62     if (SwigDerivedClassHasMethod("Apply", swigMethodTypes0))
   63       swigDelegate0 = new SwigDelegateFieldProcessor_0(SwigDirectorApply);
   64     XapianPINVOKE.FieldProcessor_director_connect(swigCPtr, swigDelegate0);
   65   }
   66 
   67   private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
   68     global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);
   69     bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(FieldProcessor));
   70     return hasDerivedMethod;
   71   }
   72 
   73   private global::System.IntPtr SwigDirectorApply(string str) {
   74     return Query.getCPtr(Apply(str)).Handle;
   75   }
   76 
   77   public delegate global::System.IntPtr SwigDelegateFieldProcessor_0(string str);
   78 
   79   private SwigDelegateFieldProcessor_0 swigDelegate0;
   80 
   81   private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(string) };
   82 }
   83 
   84 }