package Ġtests Ċ Ċ import Ġio . fluid sonic . rap tor .* ĊĊ Ċ class ĠCounter Component Ġ: ĠR apt or Component . Default < Counter Component >() Ġ{ ĊĊ ĉ var Ġ_ count Ġ= Ġ 0 ĊĊĊ ĉ override Ġfun ĠtoString () Ġ= Ċĉ ĉ " counter Ġ($_ count )" ĊĊĊ ĉ override Ġfun ĠR apt or Component Configuration End Scope . on Configuration Ended () Ġ{ Ċĉ ĉ property Registry . register ( Count R apt or Property Key , Ġ_ count ) Ċ ĉ } ĊĊĊ ĉ object ĠKey Ġ: ĠR apt or Component Key < Counter Component > Ġ{ ĊĊĉ ĉ override Ġfun ĠtoString () Ġ= Ġ" counter " Ċ ĉ } Ċ } ĊĊ Ċ @ R apt or Dsl Ċ fun ĠR apt or Component Set < Counter Component >. increment () Ġ= Ġconfigure Ġ{ Ċ ĉ _ count Ġ+= Ġ 1 Ċ } ĊĊ Ċ @ R apt or Dsl Ċ val ĠR apt or TopLevel Configuration Scope . counter Ċ ĉ get () Ġ= Ġcomponent Registry . configure ( Counter Component . Key ) Ċ