Exemple #1
0
        public void Init()
        {
            FileInfo logFile = new System.IO.FileInfo("Log4Net.config");

            if (logFile.Exists)
            {
                // Log4Net is configured using a DOMConfigurator.
                log4net.Config.XmlConfigurator.Configure(logFile);
            }
            else
            {
                // Set up a simple configuration that logs on the console.
                log4net.Config.BasicConfigurator.Configure();
            }

            // Log an baseInfo level message
            if (log.IsDebugEnabled)
            {
                if (string.IsNullOrEmpty(System.Threading.Thread.CurrentThread.Name))
                {
                    System.Threading.Thread.CurrentThread.Name = "Main(" + System.Threading.Thread.CurrentThread.ManagedThreadId + ")";
                }
                log.Debug("Interaction Tests Start");
            }

            descriptorManager.AddBootstrapDescriptors(Sxta1516.ResourcesNames.BootstrapObjectModel);
            descriptorManager.AddBootstrapDescriptors(Sxta1516.ResourcesNames.HelloWorldObjectModel);

            reliableChannel = new XrtiChannel(channel);
            IDictionary <TransportationType, XrtiChannel> channelList = new Dictionary <TransportationType, XrtiChannel>();

            channelList[TransportationType.HLA_RELIABLE]    = reliableChannel;
            channelList[TransportationType.HLA_BEST_EFFORT] = reliableChannel;
            helper = new InteractionManager(descriptorManager, channelList);

            myListener = new CountryInteractionListener(syncObject);
            helper.AddInteractionListener(myListener);
        }
        public void Init()
        {
            FileInfo logFile = new System.IO.FileInfo("Log4Net.config");
            if (logFile.Exists)
            {
                // Log4Net is configured using a DOMConfigurator.
                log4net.Config.XmlConfigurator.Configure(logFile);
            }
            else
            {
                // Set up a simple configuration that logs on the console.
                log4net.Config.BasicConfigurator.Configure();
            }

            // Log an baseInfo level message
            if (log.IsDebugEnabled)
            {
                if (string.IsNullOrEmpty(System.Threading.Thread.CurrentThread.Name))
                    System.Threading.Thread.CurrentThread.Name = "Main(" + System.Threading.Thread.CurrentThread.ManagedThreadId + ")";
                log.Debug("Interaction Tests Start");
            }

            descriptorManager.AddBootstrapDescriptors(Sxta1516.ResourcesNames.BootstrapObjectModel);
            descriptorManager.AddBootstrapDescriptors(Sxta1516.ResourcesNames.HelloWorldObjectModel);

            reliableChannel = new XrtiChannel(channel);
            IDictionary<TransportationType, XrtiChannel> channelList = new Dictionary<TransportationType, XrtiChannel>();
            channelList[TransportationType.HLA_RELIABLE] = reliableChannel;
            channelList[TransportationType.HLA_BEST_EFFORT] = reliableChannel;
            helper = new InteractionManager(descriptorManager, channelList);

            myListener = new CountryInteractionListener(syncObject);
            helper.AddInteractionListener(myListener);
        }