public DerivedRootStartInfoFactory(ITypeGetter rootTypeGetter) { _rootTypeDictionary = new SuffixedNamedTypeDictionary("Root"); var validator = new DerivedTypeValidator(typeof(Root)); var populator = new TypeDictionaryPopulator(_rootTypeDictionary, validator); populator.AddValidTypes(rootTypeGetter); }
public async Task AddToCollection_EmptyObject_DoesntThrow() { var namedTypedDictionary = new NamedTypeDictionary(); namedTypedDictionary.AddType(typeof(TestRoot)); var directory = new RootsDirectory(new TestStemsServices(), new DerivedRootStartInfoFactory(namedTypedDictionary), new TestRequestContext()); var rootCollection = directory.GetCollection("TestRoot"); // normally use the Suffixed type dictionary await rootCollection.AddAsync(new { }); }
public IEnumerable <Type> GetStemTypes(IStemsCoreServices configuration) { _stemTypeDictionary = new SuffixedNamedTypeDictionary("Stem"); var validator = new AggregateTypeValidator( GetAttributedTypeValidator(), new DerivedTypeValidator(typeof(Stem)) ); var populator = new TypeDictionaryPopulator(_stemTypeDictionary, validator); populator.AddValidTypes(_stemTypeGetter); return(_stemTypeDictionary.GetAllTypes()); }
public DataSourceVaseStartInfo(IDataSource dataSource, NamedTypeDictionary stemTypeDictionary, string startResourceName) { _stemTypeDictionary = stemTypeDictionary; _startResourceName = startResourceName; _dataSource = dataSource; }
public DerivedRootStartInfoFactory(NamedTypeDictionary rootTypeDictionary) { _rootTypeDictionary = rootTypeDictionary; }