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); }
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(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " Tests Start"); } descriptorManager = new DescriptorManager(); channelManager = new ChannelsManager(); channelManager.StartNewConnection(new Uri("memory:1?PACKET_SIZE=60")); helper = new InteractionManager(descriptorManager, channelManager); Dictionary <TransportationType, ChannelType> channelMapping = new Dictionary <TransportationType, ChannelType>(); channelMapping.Add(TransportationType.HLA_RELIABLE, ChannelType.MEMORY); channelMapping.Add(TransportationType.HLA_BEST_EFFORT, ChannelType.MEMORY); helper.SetTransportMapping(channelMapping); myListener = new MyTestBootstrapObjectListener2(); 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); }