public HostInstanceManager(ServiceUnity unity) { Unity = unity; GlobaInstances = new Dictionary <ServiceProvider, object>(); UserInstances = new Dictionary <ServiceUser, Dictionary <ServiceProvider, object> >(); Builder = new InstanceTypeBuilder(OperationMode.Server); }
public ServiceHost(ServiceBinding binding) { Binding = binding; Server = new Server((ushort)binding.MainPort); Server.PreviewAccept += PreviewAccept; Server.AcceptCompleted += Accept; ChannelManager = new ServiceChannelManager(); SetDataFormatter(new DataFormatter()); Unity = new ServiceUnity(); InstanceManager = new HostInstanceManager(Unity); IOManager = new MessageIOManager(); }
public ServiceClient(IPEndPoint remoteEndPoint) { ChannelBuffer = new Dictionary <ServiceChannel, object>(); Client = new Communication.Client(); Client.ConnectCompleted += Connect; Client.PreviewReceive += PreviewReceive; Client.ReceiveCompleted += Receive; Client.DisconnectCompleted += Disconnect; RemoteEndPoint = remoteEndPoint; Connected = false; IOManager = new MessageIOManager(); DataFormatter = new DataFormatter(); Security = new SecurityManager(); Unity = new ServiceUnity(); Builder = new InstanceTypeBuilder(OperationMode.Client); }