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)); }
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(); } }
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(); } }
Parasite ParasiteFind(Int32 ID, ParasiteFindFunc parasiteFind, string name) { IntPtr found = parasiteFind(ID, name); return((found == IntPtr.Zero) ? null : new Parasite(found)); }
Parasite ParasiteFind(Int32 ID, ParasiteFindFunc parasiteFind, string name) { IntPtr found = parasiteFind(ID, name); return (found == IntPtr.Zero) ? null : new Parasite(found); }