I have a working WCF interface using over 100 ServiceKnownType in a contract as follows:
[ServiceKnownType(typeof(RowUser))]
[ServiceKnownType(typeof(RowRegion))]
[ServiceKnownType(typeof(RowDocument))]
[... loads more ...]
[ServiceContract(SessionMode = SessionMode.Required)]
public interface IServiceBrowse : IDisposable
{
[OperationContract]
void Insert(Row satz);
}
Is there a way to provide these ServiceKnownTypes at runtime?
Not only is it error-prone and tedious to add all of these ServiceKnownTypes to the source code, it keeps my assemblies in a connection in a way that I don't like (I would like to be able to extract these types into nodes to decouple them, but cannot, because the service needs to list all known types).
source
share