예제 #1
0
        /// <summary>
        /// Register the Service Property as IPC Server
        /// </summary>
        private void RegisterServer()
        {
            Repeater = new DataEventRepeator();
            IpcServerChannel channel = new IpcServerChannel("NetOffice.SampleChannel");
            ChannelServices.RegisterChannel(channel, true);
            RemotingConfiguration.RegisterWellKnownServiceType(
                                        typeof(WebTranslationService),
                                        "NetOffice.WebTranslationService.DataService",
                                        WellKnownObjectMode.Singleton);

            Service = new WebTranslationService();
            Repeater.Translation += new TranslationEventHandler(ServiceOnTranslation);
            Service.AddEventRepeater(Repeater);
        }
예제 #2
0
        /// <summary>
        /// Register the Service Property as IPC Server
        /// </summary>
        private void RegisterServer()
        {
            Repeater = new DataEventRepeator();
            IpcServerChannel channel = new IpcServerChannel("NetOffice.SampleChannel");

            ChannelServices.RegisterChannel(channel, true);
            RemotingConfiguration.RegisterWellKnownServiceType(
                typeof(WebTranslationService),
                "NetOffice.WebTranslationService.DataService",
                WellKnownObjectMode.Singleton);

            Service = new WebTranslationService();
            Repeater.Translation += new TranslationEventHandler(ServiceOnTranslation);
            Service.AddEventRepeater(Repeater);
        }
예제 #3
0
 public void AddEventRepeater(DataEventRepeator repeater)
 {
     Reapters.Add(repeater);
 }