Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var fooHandle = new FooHandler();
            var f1Filter  = new F1Filter();

            using (f1Filter)
            {
                fooHandle.AddF1Filter(f1Filter);
                // 其他业务
            }
            HandleFoo(fooHandle);
        }
Ejemplo n.º 2
0
 public void Dispose()
 {
     FooHandler.RemoveF1Filter(this);
 }