Exemplo n.º 1
0
 public void CheckMembers()
 {
     var type = typeof (MyClass);
     var definition = new TypeDefinition(type);
     Assert.AreEqual(type.Namespace, definition.Namespace);
     Assert.AreEqual(type.Name, definition.Name);
     Assert.IsNotNull(definition.Members);
     Assert.AreEqual(17, definition.Members.Count);
 }
Exemplo n.º 2
0
 public void AddType(Type type)
 {
     TypeDefinition typeDefinition;
     if (!typeDefinitions.TryGetValue(type.Name, out typeDefinition))
     {
         typeDefinition = new TypeDefinition(type);
         typeDefinitions[type.Name] = typeDefinition;
         Types.Add(typeDefinition);
     }
 }
Exemplo n.º 3
0
 public void CheckHiddenMemberAreStillHidden()
 {
     var type = typeof (MyClass);
     var definition = new TypeDefinition(type);
     Assert.AreEqual(type.Namespace, definition.Namespace);
     Assert.AreEqual(type.Name, definition.Name);
     Assert.IsNotNull(definition.Members);
     Assert.IsNull(definition.Members.FirstOrDefault(x => x.Signature.Contains("hidden")));
     Assert.IsNull(definition.Members.FirstOrDefault(x => x.Signature.Contains("Hidden")));
 }