public DefaultPropertyDefinition(TypeDefinition typeDef,
            string name,
            GetMethod getter,
            SetMethod setter,
            string declaringTypeName,
            MemberAccessibility memberAccessibility,
            MemberType memberType)
        {
            if (typeDef == null) throw new ArgumentNullException("typeDef");
            if (name == null) throw new ArgumentNullException("name");
            if (declaringTypeName == null) throw new ArgumentNullException("declaringTypeName");

            Name = name;
            FullName = declaringTypeName + "." + name;
            this.getter = getter;
            this.setter = setter;
            this.memberAccessibility = memberAccessibility;
            this.memberType = memberType;
            TypeDef = typeDef;

            SerializedName = name.IsAutoPropertyBackingField()
                ? name.AutoPropertyName()
                : name;
        }
Exemplo n.º 2
0
 public static void RegisterTypeDefinition(TypeDefinition typeDef)
 {
     KnownTypesByIdentifier[CurrentTypeResolver.GetTypeIdentifier(typeDef.Type)] = typeDef;
     KnownTypesByType[typeDef.Type] = typeDef;
 }