Exemplo n.º 1
0
        public static void EnsureNotNull(params object[] notNullReferences)
        {
            DbC.EnsureNotNullNorEmpty(notNullReferences);

            foreach (var o in notNullReferences)
            {
                if (null == o)
                {
                    throw new PreConditionNotEnsuredException();
                }
            }
        }
Exemplo n.º 2
0
        public static void EnsureNotNullNorEmpty <T>(params T[] ts)
        {
            DbC.EnsureNotNullNorEmpty(ts);

            foreach (var t in ts)
            {
                if (null == t)
                {
                    throw new PreConditionNotEnsuredException();
                }
            }
        }
Exemplo n.º 3
0
        public static void EnsureNotNullNorEmpty <T>(params ICollection <T>[] collections)
        {
            DbC.EnsureNotNullNorEmpty(collections);

            foreach (var c in collections)
            {
                if (null == c)
                {
                    throw new PreConditionNotEnsuredException();
                }

                if (c.Count <= 0)
                {
                    throw new PreConditionNotEnsuredException();
                }
            }
        }