Exemple #1
0
        public bool IsValueType(CilClassName className)
        {
            if (IsExternalType(className))
            {
                var type = ReflectionHelper.GetExternalType(className);
                return(type.IsValueType);
            }

            var @class = AllClasses.Single(c => c.Name.ToString() == className.ToString());

            if (@class.IsInterface)
            {
                return(false);
            }

            var result = @class.ExtendsName.ToString() == "[mscorlib]System.ValueType" || @class.ExtendsName.ToString() == "[mscorlib]System.Enum";

            return(result);
        }
Exemple #2
0
 public bool IsExternalType(CilClassName className)
 {
     return(AssemblyRefs.Any(ar => ar.Name == className.AssemblyName));
 }