Ejemplo n.º 1
0
        /// <summary>
        /// Adds the type to the generation context
        /// </summary>
        /// <param name="type"></param>
        public void Add(Type type)
        {
            Requires.NotNull(type, nameof(type));

            GroupGeneratedTypes?.Add(type);
            TypeGeneratedTypes?.Add(type);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Checks if a type dependency has already been generated for a currently generated type.
 /// This method also returns true if the argument is the currently generated type itself.
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public bool HasBeenGeneratedForType(Type type)
 {
     Requires.NotNull(type, nameof(type));
     return(TypeGeneratedTypes?.Contains(type) ?? false);
 }