Пример #1
0
        protected internal static TDerivedArgs Get(TValue1 value1)
        {
            TDerivedArgs local1 = PooledEventArgs <TDerivedArgs> .Get();

            local1.SetValues(value1);
            local1.Validate();
            return(local1);
        }
Пример #2
0
        protected internal static TDerivedArgs Get(TValue1 value1, TValue2 value2, TValue3 value3, TValue4 value4, TValue5 value5)
        {
            TDerivedArgs local1 = PooledEventArgs <TDerivedArgs> .Get();

            local1.SetValues(value1, value2, value3, value4, value5);
            local1.Validate();
            return(local1);
        }
Пример #3
0
        public static void RaisePooled <TDerivedArgs, TValue1, TValue2, TValue3, TValue4, TValue5>(this EventHandler <TDerivedArgs> handler, object sender, TValue1 value1, TValue2 value2, TValue3 value3, TValue4 value4, TValue5 value5) where TDerivedArgs : PooledEventArgs <TDerivedArgs, TValue1, TValue2, TValue3, TValue4, TValue5>, new()
        {
            if (handler != null)
            {
                TDerivedArgs e = PooledEventArgs <TDerivedArgs, TValue1, TValue2, TValue3, TValue4, TValue5> .Get(value1, value2, value3, value4, value5);

                try
                {
                    handler(sender, e);
                }
                finally
                {
                    e.Return();
                }
            }
        }
Пример #4
0
 public static TDerivedArgs Get <TDerivedArgs, TValue1, TValue2>(TValue1 value1, TValue2 value2) where TDerivedArgs : PooledEventArgs <TDerivedArgs, TValue1, TValue2>, new() =>
 PooledEventArgs <TDerivedArgs, TValue1, TValue2> .Get(value1, value2);
Пример #5
0
 public static TDerivedArgs Get <TDerivedArgs, TValue1>(TValue1 value1) where TDerivedArgs : PooledEventArgs <TDerivedArgs, TValue1>, new() =>
 PooledEventArgs <TDerivedArgs, TValue1> .Get(value1);
Пример #6
0
 public static TDerivedArgs Get <TDerivedArgs, TValue1, TValue2, TValue3, TValue4, TValue5>(TValue1 value1, TValue2 value2, TValue3 value3, TValue4 value4, TValue5 value5) where TDerivedArgs : PooledEventArgs <TDerivedArgs, TValue1, TValue2, TValue3, TValue4, TValue5>, new() =>
 PooledEventArgs <TDerivedArgs, TValue1, TValue2, TValue3, TValue4, TValue5> .Get(value1, value2, value3, value4, value5);
Пример #7
0
 public override TDerivedArgs Clone() =>
 PooledEventArgs <TDerivedArgs, TValue1> .Get(this.Value1);
Пример #8
0
 public override TDerivedArgs Clone() =>
 PooledEventArgs <TDerivedArgs, TValue1, TValue2, TValue3, TValue4, TValue5> .Get(this.Value1, this.Value2, this.Value3, this.Value4, this.Value5);