Пример #1
0
 public void Data()
 {
     string name = "parasite";
       int data = 13;
       var parasite = new Parasite(name, 0, data);
       // int value = (int) parasite.Data;
 }
Пример #2
0
 public void AttachParasite()
 {
     var vectors = new Vectors(_image, "firstVector");
       var parasite = new Parasite("foo", 0, 13);
       vectors.AttachParasite(parasite);
       Assert.AreEqual(1, vectors.ParasiteList.Count);
 }
Пример #3
0
 public void Data()
 {
     string name     = "parasite";
     int    data     = 13;
     var    parasite = new Parasite(name, 0, data);
     // int value = (int) parasite.Data;
 }
Пример #4
0
 public void AttachParasite(Parasite parasite)
 {
     if (!gimp_item_attach_parasite(ID, parasite.Ptr))
     {
         throw new GimpSharpException();
     }
 }
Пример #5
0
 public void DetachParasite(Parasite parasite)
 {
     if (!gimp_item_detach_parasite(ID, parasite.Name))
     {
         throw new GimpSharpException();
     }
 }
Пример #6
0
 public void ParasiteAttach(Parasite parasite)
 {
     if (!gimp_image_parasite_attach(ID, parasite.Ptr))
     {
         throw new GimpSharpException();
     }
 }
Пример #7
0
 public void AttachParasite()
 {
     var parasite = new Parasite("foo", 0, 13);
       Gimp.AttachParasite(parasite);
       Assert.AreEqual(1, Gimp.ParasiteList.Count);
       Gimp.DetachParasite(parasite);
 }
Пример #8
0
        public void AttachParasite()
        {
            var parasite = new Parasite("foo", 0, 13);

            Gimp.AttachParasite(parasite);
            Assert.AreEqual(1, Gimp.ParasiteList.Count);
            Gimp.DetachParasite(parasite);
        }
Пример #9
0
        public void AttachParasite()
        {
            var vectors  = new Vectors(_image, "firstVector");
            var parasite = new Parasite("foo", 0, 13);

            vectors.AttachParasite(parasite);
            Assert.AreEqual(1, vectors.ParasiteList.Count);
        }
Пример #10
0
 public void Constructor()
 {
     string name = "parasite";
       // string foo = "foo";
       int data = 13;
       var parasite = new Parasite(name, 0, data);
       Assert.AreEqual(name, parasite.Name);
 }
Пример #11
0
        public void DataSize()
        {
            string name = "parasite";
              int data = 13;
              var parasite = new Parasite(name, 0, data);

              long size = parasite.DataSize;
              Assert.AreEqual(sizeof(int), size);
        }
Пример #12
0
        public void Constructor()
        {
            string name = "parasite";
            // string foo = "foo";
            int data     = 13;
            var parasite = new Parasite(name, 0, data);

            Assert.AreEqual(name, parasite.Name);
        }
Пример #13
0
 public void GetParasite()
 {
     Assert.IsNull(Gimp.GetParasite("foo"));
       var parasite = new Parasite("foo", 0, 13);
       Gimp.AttachParasite(parasite);
       var found = Gimp.GetParasite("foo");
       Assert.IsNotNull(found);
       Assert.AreEqual(parasite, found);
       Gimp.DetachParasite(parasite);
 }
Пример #14
0
        public void DataSize()
        {
            string name     = "parasite";
            int    data     = 13;
            var    parasite = new Parasite(name, 0, data);

            long size = parasite.DataSize;

            Assert.AreEqual(sizeof(int), size);
        }
Пример #15
0
        public void Equals()
        {
            int data = 13;
              var parasite1 = new Parasite("parasite", 0, data);
              var parasite2 = new Parasite("parasite", 0, data);
              Assert.IsTrue(parasite1.Equals(parasite2));

              data = 14;
              var parasite3 = new Parasite("parasite", 0, data);
              Assert.IsFalse(parasite1.Equals(parasite3));
        }
Пример #16
0
        public void ParasiteFind()
        {
            var vectors  = new Vectors(_image, "firstVector");
            var parasite = new Parasite("foo", 0, 13);

            vectors.AttachParasite(parasite);
            var found = vectors.ParasiteFind("foo");

            Assert.AreEqual(parasite, found);
            Assert.IsNull(vectors.ParasiteFind("bar"));
        }
Пример #17
0
        public void AttachParasite()
        {
            string name = "parasite";
              int data = 13;
              var parasite = new Parasite(name, 0, data);

              _drawable.AttachParasite(parasite);
              var found = _drawable.ParasiteFind(name);
              Assert.IsNotNull(found);
              Assert.AreEqual(name, found.Name);
        }
Пример #18
0
        public void GetParasite()
        {
            Assert.IsNull(Gimp.GetParasite("foo"));
            var parasite = new Parasite("foo", 0, 13);

            Gimp.AttachParasite(parasite);
            var found = Gimp.GetParasite("foo");

            Assert.IsNotNull(found);
            Assert.AreEqual(parasite, found);
            Gimp.DetachParasite(parasite);
        }
Пример #19
0
        public void AttachParasite()
        {
            string name     = "parasite";
            int    data     = 13;
            var    parasite = new Parasite(name, 0, data);

            _drawable.AttachParasite(parasite);
            var found = _drawable.ParasiteFind(name);

            Assert.IsNotNull(found);
            Assert.AreEqual(name, found.Name);
        }
Пример #20
0
        public void DetachParasite()
        {
            string name = "parasite";
              int data = 13;
              var parasite = new Parasite(name, 0, data);

              _drawable.AttachParasite(parasite);
              _drawable.DetachParasite(parasite);
              var found = _drawable.ParasiteFind(name);
              Assert.IsNull(found);
              Assert.AreEqual(0, _drawable.ParasiteList.Count);
        }
Пример #21
0
        public void DetachParasite()
        {
            string name     = "parasite";
            int    data     = 13;
            var    parasite = new Parasite(name, 0, data);

            _drawable.AttachParasite(parasite);
            _drawable.DetachParasite(parasite);
            var found = _drawable.ParasiteFind(name);

            Assert.IsNull(found);
            Assert.AreEqual(0, _drawable.ParasiteList.Count);
        }
Пример #22
0
        public void Equals()
        {
            int data      = 13;
            var parasite1 = new Parasite("parasite", 0, data);
            var parasite2 = new Parasite("parasite", 0, data);

            Assert.IsTrue(parasite1.Equals(parasite2));

            data = 14;
            var parasite3 = new Parasite("parasite", 0, data);

            Assert.IsFalse(parasite1.Equals(parasite3));
        }
Пример #23
0
        public void ParasiteList()
        {
            var list = _drawable.ParasiteList;

            Assert.AreEqual(0, list.Count);

            string name     = "parasite";
            int    data     = 13;
            var    parasite = new Parasite(name, 0, data);

            _drawable.AttachParasite(parasite);

            list = _drawable.ParasiteList;
            Assert.AreEqual(1, list.Count);
            Assert.AreEqual(parasite, list[0]);
        }
Пример #24
0
        public void ParasiteList()
        {
            var list = _drawable.ParasiteList;
              Assert.AreEqual(0, list.Count);

              string name = "parasite";
              int data = 13;
              var parasite = new Parasite(name, 0, data);

              _drawable.AttachParasite(parasite);

              list = _drawable.ParasiteList;
              Assert.AreEqual(1, list.Count);
              Assert.AreEqual(parasite, list[0]);
        }
Пример #25
0
 public Parasite(Parasite parasite)
 {
     _parasite = gimp_parasite_copy(parasite._parasite);
 }
Пример #26
0
 public void ParasiteFind()
 {
     var vectors = new Vectors(_image, "firstVector");
       var parasite = new Parasite("foo", 0, 13);
       vectors.AttachParasite(parasite);
       var found = vectors.ParasiteFind("foo");
       Assert.AreEqual(parasite, found);
       Assert.IsNull(vectors.ParasiteFind("bar"));
 }
Пример #27
0
 public Parasite(Parasite parasite)
 {
     _parasite = gimp_parasite_copy(parasite._parasite);
 }
Пример #28
0
 public static void DetachParasite(Parasite parasite)
 {
     if (!gimp_detach_parasite(parasite.Name))
     {
       throw new GimpSharpException();
     }
 }
Пример #29
0
 public static void AttachParasite(Parasite parasite)
 {
     if (!gimp_attach_parasite(parasite.Ptr))
     {
       throw new GimpSharpException();
     }
 }
Пример #30
0
 public void Add(Parasite parasite)
 {
     _list.Add(parasite);
 }
Пример #31
0
 public void ParasiteDetach(Parasite parasite)
 {
     if (!gimp_vectors_parasite_detach(_ID, parasite.Name))
     {
       throw new GimpSharpException();
     }
 }
Пример #32
0
 public void ParasiteAttach(Parasite parasite)
 {
     if (!gimp_image_parasite_attach(ID, parasite.Ptr))
     {
       throw new GimpSharpException();
     }
 }
Пример #33
0
 public void Add(Parasite parasite)
 {
     _list.Add(parasite);
 }