Ejemplo n.º 1
0
 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);
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
 protected override StaticTypeWrapper GetPropertyType(StaticPropertyWrapper property)
 {
     IProperty propertyHandle = (IProperty)property.Handle;
     return MakeType(propertyHandle.Type);
 }
Ejemplo n.º 5
0
 protected override PropertyAttributes GetPropertyAttributes(StaticPropertyWrapper property)
 {
     // Note: There don't seem to be any usable property attributes.
     return 0;
 }
Ejemplo n.º 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);
Ejemplo n.º 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);
 }
Ejemplo n.º 9
0
        protected internal override StaticMethodWrapper GetPropertySetMethod(StaticPropertyWrapper property)
        {
            PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle;

            return(WrapAccessor(propertyHandle.SetMethod, property));
        }
Ejemplo n.º 10
0
        protected internal override StaticTypeWrapper GetPropertyType(StaticPropertyWrapper property)
        {
            PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle;

            return(MakeType(propertyHandle.PropertyType));
        }
Ejemplo n.º 11
0
        protected internal override PropertyAttributes GetPropertyAttributes(StaticPropertyWrapper property)
        {
            PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle;

            return((PropertyAttributes)propertyHandle.Attributes);
        }
Ejemplo n.º 12
0
 private StaticMethodWrapper GetDiscriminatorMethod(StaticPropertyWrapper property)
 {
     if (GetMethod != null)
         return property.GetMethod;
     if (SetMethod != null)
         return property.SetMethod;
     return null;
 }
Ejemplo n.º 13
0
 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);
Ejemplo n.º 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);
Ejemplo n.º 17
0
 protected internal override PropertyAttributes GetPropertyAttributes(StaticPropertyWrapper property)
 {
     PropertyDefinition propertyHandle = (PropertyDefinition)property.Handle;
     return (PropertyAttributes)propertyHandle.Attributes;
 }