I had a problem when I tried to implement the ServiceKnownType example from MSDN. In this example, they provide the following classes:
[DataContract()]
public class Widget
{
[DataMember]
public string Id;
[DataMember]
public string Catalog;
}
[DataContract()]
public class Machine : Widget
{
[DataMember]
public string Maker;
}
And the following interface:
[ServiceKnownType(typeof(Widget))]
[ServiceKnownType(typeof(Machine))]
[ServiceContract()]
public interface ICatalog
{
[OperationContract]
Hashtable GetItems();
}
, - ( " " /svcutil.exe) "ServiceKnownType" - ICatalog,
" , :...
, "" "
, , , .
, GetItems Hashtable , , ..
[OperationContract]
object GetItems();
[OperationContract]
Hashtable GetItems(object obj);
"ServiceKnownType" - ICatalog.
- , ?