private void Add <T>(IGeneratable <T> generator) { if (!Has(typeof(T)) && !generator.GetType().IsInterface) { supportedGenerators.Add(typeof(T), generator); } }
// TODO: Unexpose this public bool CanFirstParameterBeInstance(IGeneratable parent, GenerationOptions opts) { var param = Parameters.FirstOrDefault(); if (param == null) { return(false); } // hacky check for symbol equality return(param.Resolve(opts).GetType() == parent.GetType()); }