/// <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); }
/// <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); }