Inheritance: System.Attribute
Beispiel #1
0
 private static Tag ToTag(object obj, PropertyInfo info, NbtPropertyAttribute attrib)
 {
     if (attrib is NbtListAttribute && obj is IList)
     {
         return(ToTagList(obj, (attrib as NbtListAttribute).SubType ?? TagType.End));
     }
     else
     {
         return(ToTag(obj, attrib.Type ?? InferType(info.PropertyType)));
     }
 }
Beispiel #2
0
 private static object FromTag(Tag tag, PropertyInfo info, NbtPropertyAttribute attrib)
 {
     return(FromTag(tag, info.PropertyType));
 }