Exemplo n.º 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);

            reliableChannel = new XrtiChannel(channel);
            Dictionary<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 MyTestBootstrapObjectListener(syncObject);
            helper.AddInteractionListener(myListener);
        }
Exemplo n.º 2
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);

            reliableChannel = new XrtiChannel(channel);
            Dictionary <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 MyTestBootstrapObjectListener(syncObject);
            helper.AddInteractionListener(myListener);
        }