示例#1
0
            /// <summary>
            /// Creates a new <see cref="Delegator"/> instance which invokes the
            /// given delegates when <see cref="SetUp"/> and <see cref="TearDown"/>
            /// are called.
            /// </summary>
            /// <param name="setup"></param>
            /// The delegate to invoke when <see cref="SetUp"/> is called.
            /// <param name="teardown">
            /// The delegate to invoke when <see cref="TearDown"/> is called.
            /// </param>
            public Delegator(EventQueue dispatcher, Collection <V> collection,
                             SetUpDelegate setup, TearDownDelegate teardown)
                : base(dispatcher, collection)
            {
                this.s = setup;

                this.t = (teardown != null) ? teardown : new TearDownDelegate(base.TearDown);
            }
示例#2
0
 /// <summary>
 /// Creates a new <see cref="Delegator"/> instance which invokes
 /// the given delegate when <see cref="SetUp"/> is called, and which
 /// invokes the default <see cref="CollectionMirror.TearDown"/> method.
 /// </summary>
 /// <param name="setup">
 /// The delegate to invoke when <see cref="SetUp"/> is called.
 /// </param>
 public Delegator(EventQueue dispatcher, Collection <V> collection, SetUpDelegate s)
     : this(dispatcher, collection, s, null)
 {
 }