I have a ServiceContract
which returns dynamic type and looks like following:
public dynamic LoginViaOpenId(string openIdUrl)
The dynamic return type could be a DataContract
that I have defined, or a string. But since I have not used my DataContract
on the service, client does not know anything about it and cannot access it.
My DataContract
is something like below:
[DataContract]
public enum OpenIdStatus
{
[EnumMember]
Authenticated,
[EnumMember]
Authenticating,
[EnumMember]
Cancelled,
[EnumMember]
Failed,
[EnumMember]
RedirectToLogon
}
I know if I had hierarchical types I could have used KnownType
to conquer this, but am out of idea for this scenario.
Any idea?