private void BindDomainObjects(Assembly[] domainObjectAssemblies) { IEnumerable <Type> types = locator.ResolveDomainObjects(domainObjectAssemblies); var count = 0; var commandMappings = new Dictionary <Type, List <CommandMethodMapping> >(); foreach (Type domainObjectType in types) { count++; IEnumerable <CommandMethodMapping> methodsOfType = locator.ResolveConventionalMethods(domainObjectType); foreach (CommandMethodMapping method in methodsOfType) { if (!commandMappings.ContainsKey(method.CommandType)) { commandMappings.Add(method.CommandType, new List <CommandMethodMapping>()); } commandMappings[method.CommandType].Add(method); } } commandMapping = commandMappings; var assemblyCount = domainObjectAssemblies.Length; logger.LogDebug("Found {count} DomainObjects in {assemblyCount} assemblies", count, assemblyCount); }
private void BindDomainObjects(Assembly[] domainObjectAssemblies) { IEnumerable <Type> types = locator.ResolveDomainObjects(domainObjectAssemblies); var count = 0; var commandMappings = new Dictionary <Type, List <CommandMethodMapping> >(); foreach (Type domainObjectType in types) { count++; IEnumerable <CommandMethodMapping> methodsOfType = locator.ResolveConventionalMethods(domainObjectType); foreach (CommandMethodMapping method in methodsOfType) { if (!commandMappings.ContainsKey(method.CommandType)) { commandMappings.Add(method.CommandType, new List <CommandMethodMapping>()); } commandMappings[method.CommandType].Add(method); } } commandMapping = commandMappings; Trace.WriteLine($"Handled {count} domainobjects from {domainObjectAssemblies.Length} assemblies", Category); }