コード例 #1
0
    public static void AddPool <TPool>(Action <TPool> poolCreatedCallback) where TPool : SHPoolBase
    {
        Throw.AnyNull(new { poolCreatedCallback });

        var pool = s_instance.gameObject.AddComponent <TPool> ();

        poolCreatedCallback(pool);
        AddPool(pool);
    }
コード例 #2
0
        public void AnyNull_AnyPropertieNull_Exception()
        {
            Assert.Catch <ArgumentNullException> (() => {
                Throw.AnyNull(new { a = (string)null, b = "2", c = 3l });
            });

            Assert.Catch <ArgumentNullException> (() => {
                Throw.AnyNull(new { a = 1, b = (object)null, c = 3l });
            });

            Assert.Catch <ArgumentNullException> (() => {
                Throw.AnyNull(new { a = 1, b = "2", c = (string)null });
            });
        }
コード例 #3
0
 public void AnyNull_AllPropertiesNotNull_NoException()
 {
     Throw.AnyNull(new { a = 1, b = "2", c = 3l });
 }