Example #1
0
        public void CreateNonNullableType_ReturnsCorrectType()
        {
            var result  = ReflectionUtilities.CreateNonNullableType(typeof(string));
            var result2 = ReflectionUtilities.CreateNonNullableType(typeof(int));

            Assert.AreEqual(typeof(NonNullable <string>), result);
            Assert.AreEqual(typeof(int), result2);
        }
Example #2
0
        private Type GetNonNullInputSystemTypeFor(GraphQLBaseType type)
        {
            var systemType = this.GetSystemTypeFor(type);

            if (!ReflectionUtilities.IsValueType(systemType))
            {
                return(ReflectionUtilities.CreateNonNullableType(systemType));
            }

            return(systemType);
        }