private StaticMethodWrapper GetDiscriminatorMethod(StaticPropertyWrapper property)
 {
     if (GetMethod != null)
     {
         return(property.GetMethod);
     }
     if (SetMethod != null)
     {
         return(property.SetMethod);
     }
     return(null);
 }
 /// <summary>
 /// Gets the attributes of a property.
 /// </summary>
 /// <param name="property">The property, not null.</param>
 /// <returns>The property attributes.</returns>
 protected internal abstract PropertyAttributes GetPropertyAttributes(StaticPropertyWrapper property);
        protected override StaticMethodWrapper GetPropertySetMethod(StaticPropertyWrapper property)
        {
            IProperty propertyHandle = (IProperty)property.Handle;
            if (!propertyHandle.IsValid())
                return null;

#if RESHARPER_31
            IAccessor accessorHandle = propertyHandle.Setter(false);
#else
            IAccessor accessorHandle = propertyHandle.Setter;
#endif
            return accessorHandle != null && accessorHandle.IsValid() ? WrapAccessor(accessorHandle, property) : null;
        }
 protected override StaticTypeWrapper GetPropertyType(StaticPropertyWrapper property)
 {
     IProperty propertyHandle = (IProperty)property.Handle;
     return MakeType(propertyHandle.Type);
 }
 protected override PropertyAttributes GetPropertyAttributes(StaticPropertyWrapper property)
 {
     // Note: There don't seem to be any usable property attributes.
     return 0;
 }
示例#6
0
 /// <summary>
 /// Gets the set method of a property, or null if none.
 /// </summary>
 /// <param name="property">The property, not null.</param>
 /// <returns>The set method, or null if none.</returns>
 protected internal abstract StaticMethodWrapper GetPropertySetMethod(StaticPropertyWrapper property);
示例#7
0
 /// <summary>
 /// Gets the property type.
 /// </summary>
 /// <param name="property">The property, not null.</param>
 /// <returns>The property type.</returns>
 protected internal abstract StaticTypeWrapper GetPropertyType(StaticPropertyWrapper property);
 protected internal override StaticMethodWrapper GetPropertySetMethod(StaticPropertyWrapper property)
 {
     PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle;
     return WrapAccessor(propertyHandle.SetMethod, property);
 }
示例#9
0
        protected internal override StaticMethodWrapper GetPropertySetMethod(StaticPropertyWrapper property)
        {
            PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle;

            return(WrapAccessor(propertyHandle.SetMethod, property));
        }
示例#10
0
        protected internal override StaticTypeWrapper GetPropertyType(StaticPropertyWrapper property)
        {
            PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle;

            return(MakeType(propertyHandle.PropertyType));
        }
示例#11
0
        protected internal override PropertyAttributes GetPropertyAttributes(StaticPropertyWrapper property)
        {
            PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle;

            return((PropertyAttributes)propertyHandle.Attributes);
        }
 private StaticMethodWrapper GetDiscriminatorMethod(StaticPropertyWrapper property)
 {
     if (GetMethod != null)
         return property.GetMethod;
     if (SetMethod != null)
         return property.SetMethod;
     return null;
 }
 protected internal override StaticTypeWrapper GetPropertyType(StaticPropertyWrapper property)
 {
     PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle;
     return MakeType(propertyHandle.PropertyType);
 }
 /// <summary>
 /// Gets the set method of a property, or null if none.
 /// </summary>
 /// <param name="property">The property, not null.</param>
 /// <returns>The set method, or null if none.</returns>
 protected internal abstract StaticMethodWrapper GetPropertySetMethod(StaticPropertyWrapper property);
示例#15
0
 /// <summary>
 /// Gets the attributes of a property.
 /// </summary>
 /// <param name="property">The property, not null.</param>
 /// <returns>The property attributes.</returns>
 protected internal abstract PropertyAttributes GetPropertyAttributes(StaticPropertyWrapper property);
 /// <summary>
 /// Gets the property type.
 /// </summary>
 /// <param name="property">The property, not null.</param>
 /// <returns>The property type.</returns>
 protected internal abstract StaticTypeWrapper GetPropertyType(StaticPropertyWrapper property);
 protected internal override PropertyAttributes GetPropertyAttributes(StaticPropertyWrapper property)
 {
     PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle;
     return (PropertyAttributes)propertyHandle.Attributes;
 }