コード例 #1
0
 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);
     }
 }
コード例 #2
0
        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);
            }
        }