public static Serialize ( |
||
property | The property to refer. | |
return |
internal static Index Index(IndexExpression expression) { return(new Index() { Object = Serialize(expression.Object), Indexer = expression.Indexer.Null(p => PropertyRef.Serialize(p)), Arguments = expression.Arguments.Select(Serialize).ToArray(), }.Apply(n => n.Type = TypeRef.Serialize(expression.Type))); }
/// <summary> /// Returns the member reference which refers specified member. /// </summary> /// <param name="member">The member to refer.</param> /// <returns>The member reference which refers specified member.</returns> public static MemberRef Serialize(MemberInfo member) { switch (member.MemberType) { case MemberTypes.Constructor: case MemberTypes.Method: return(MethodRef.Serialize((MethodBase)member)); case MemberTypes.Event: return(EventRef.Serialize((EventInfo)member)); case MemberTypes.Field: return(FieldRef.Serialize((FieldInfo)member)); case MemberTypes.Property: return(PropertyRef.Serialize((PropertyInfo)member)); default: throw new ArgumentOutOfRangeException("member.MemberType"); } }