Exemplo n.º 1
0
        public static void Handle(Type type)
        {
            var normalized = Normalize(type);

            if (normalized != type)
            {
                Handle(normalized);
                return;
            }

            if (types.ContainsKey(type))
            {
                return;
            }

            if (simpleTypesToCreate.Contains(type))
            {
                return;
            }

            var complex = ComplexType.Scan(type);

            if (complex != null)
            {
                types[type] = complex;
                return;
            }

            if (type.IsEnum)
            {
                if (!simpleTypesToCreate.Contains(type))
                {
                    simpleTypesToCreate.Add(type);
                }
            }
        }