Пример #1
0
 internal ParasiteList(Int32 ID, GetParasitesFunc getParasites,
                       ParasiteFindFunc parasiteFind)
 {
     if (getParasites(ID, out int numParasites, out IntPtr parasites))
     {
         _list = Util.ToList <Parasite>(parasites, numParasites,
                                        (s) => ParasiteFind(ID, parasiteFind,
                                                            s));
     }
Пример #2
0
 internal ParasiteList(Int32 ID, GetParasitesFunc getParasites,
     ParasiteFindFunc parasiteFind)
 {
     int numParasites;
       IntPtr parasites;
       if (getParasites(ID, out numParasites, out parasites))
     {
       _list = Util.ToList<Parasite>(parasites, numParasites,
             (s) => ParasiteFind(ID, parasiteFind,
                         s));
     }
       else
     {
       throw new GimpSharpException();
     }
 }
Пример #3
0
        internal ParasiteList(Int32 ID, GetParasitesFunc getParasites,
                              ParasiteFindFunc parasiteFind)
        {
            int    numParasites;
            IntPtr parasites;

            if (getParasites(ID, out numParasites, out parasites))
            {
                _list = Util.ToList <Parasite>(parasites, numParasites,
                                               (s) => ParasiteFind(ID, parasiteFind,
                                                                   s));
            }
            else
            {
                throw new GimpSharpException();
            }
        }
Пример #4
0
        Parasite ParasiteFind(Int32 ID, ParasiteFindFunc parasiteFind, string name)
        {
            IntPtr found = parasiteFind(ID, name);

            return((found == IntPtr.Zero) ? null : new Parasite(found));
        }
Пример #5
0
 Parasite ParasiteFind(Int32 ID, ParasiteFindFunc parasiteFind, string name)
 {
     IntPtr found = parasiteFind(ID, name);
       return (found == IntPtr.Zero) ? null : new Parasite(found);
 }