H
Hugo Ferreira
Hi everyone,
I got a question which I hope someone will be able to help with
Without entering in much details, here's a sample:
public override IMessage Invoke(IMessage msg) {
(...)
string methodName = (string) msg.Properties["__MethodName"];
memberInfo = myType.GetMember(methodName)[0];
if (methodName.StartsWith("get_") || methodName.StartsWith("set_")) {
propertyInfo = myType.GetProperty(methodName.Substring(4));
}
(...)
}
Ok... This doesn't seem very correct to me, though it works Is there any
other way to get the correspondent property of a generated get/set method?
Cheers, and thanks in advance,
Hugo
I got a question which I hope someone will be able to help with
Without entering in much details, here's a sample:
public override IMessage Invoke(IMessage msg) {
(...)
string methodName = (string) msg.Properties["__MethodName"];
memberInfo = myType.GetMember(methodName)[0];
if (methodName.StartsWith("get_") || methodName.StartsWith("set_")) {
propertyInfo = myType.GetProperty(methodName.Substring(4));
}
(...)
}
Ok... This doesn't seem very correct to me, though it works Is there any
other way to get the correspondent property of a generated get/set method?
Cheers, and thanks in advance,
Hugo