private IEmitterType LoadMember(MemberInfo member, IEmitterType sourceObject) { IEmitterType result = null; member.ToOption() .Match(x => x.IsField(), x => result = LoadField(sourceObject, (FieldInfo)x)) .Match(x => x.IsProperty(), x => result = LoadProperty(sourceObject, (PropertyInfo)x)); return result; }