Пример #1
0
        internal IEnumerable <Type> AddItem(Type type)
        {
            var compiledType = new TypeValidator <TState>(type, this);

            Add(type, compiledType);

            if (compiledType.Constraints.Any())
            {
                SetConstraints();
            }

            foreach (var property in compiledType.Properties)
            {
                if (property.HasConstraints)
                {
                    SetConstraints();
                }

                if (property.IncludeChildren)
                {
                    yield return(property.Type);
                }
            }
        }