Exemple #1
0
 public void CustomOps()
 {
     using (var o = new MyOps())
         using (var d = new CTRunDelegate(o)) {
             Assert.AreSame(o, d.Operations, "same");
         }
 }
Exemple #2
0
 public void Runs()
 {
     using (var mas = new NSMutableAttributedString("Bonjour"))
         using (var rd = new CTRunDelegate(new MyOps())) {
             var sa = new CTStringAttributes()
             {
                 RunDelegate = rd,
             };
             mas.SetAttributes(sa, new NSRange(3, 3));
             using (var fs = new CTFramesetter(mas)) {
                 Assert.True(MyOps.Ascent, "Ascent called");
                 Assert.True(MyOps.Descent, "Descent called");
                 Assert.True(MyOps.Width, "Width called");
             }
         }
 }