public NetworkStreamingServerAdapter(Type implementationType, NetworkChannel channel, ServiceMessageBuilder builder, DelegateContract contract) { var streamingCallback = typeof(NetworkStreamingCallback <>).MakeGenericType(contract.ValueType); _callback = Activator.CreateInstance(streamingCallback, new object[] { contract.StreamingType, builder, channel, implementationType }); _contract = contract; }
public static void Main(string[] args) { XmlConfigurator.Configure(); var myCStreamingService = MyCStreamingInfo(); var serviceContainer = new ServiceContainer(8000, new Dictionary <Type, object> { { typeof(IMyAService), new MyAService() }, { typeof(IMyBService), new MyBService() }, }, new Dictionary <Type, ISerializer>(), new Dictionary <string, DelegateContract> { { "MyC", DelegateContract.Create(myCStreamingService, "MyC") } }); Console.ReadKey(); }