public CommandAssembly(Assembly assembly, IKnownTypeHolder knownTypeHolder) { this.assembly = assembly; var types = assembly.GetTypes(); foreach (Type type in types) { if (type.IsInterface || type.GetCustomAttributes(typeof(DataContractAttribute), false).Length != 1) continue; knownTypeHolder.Add(type); } }
public CommandAssembly(Assembly assembly, IKnownTypeHolder knownTypeHolder) { this.assembly = assembly; var types = assembly.GetTypes(); foreach (Type type in types) { if (type.IsInterface || type.GetCustomAttributes(typeof(DataContractAttribute), false).Length != 1) { continue; } knownTypeHolder.Add(type); } }