private static MockServiceProvider CreateServiceProvider()
 {
     var serviceProviderOptions = new MockServiceProviderOptions
     {
         SettingsPropertyStore = new DictionaryPropertyStore(),
         HostInfo = new HostInfo(Guid.NewGuid(), new HostName("myhost"), IPAddress.Parse("11.22.33.44")),
         ConnectionInfo = new ConnectionInfo(IPAddress.Parse("22.33.44.55"), new IPNetwork(IPAddress.Parse("22.33.44.00"), 24)),
         DhcpInfo = new DhcpInfo(IPAddress.Parse("100.101.102.103"), IPAddress.Parse("200.201.202.203"), "my-domain-name"),
         ExternalAddress = IPAddress.Parse("50.51.52.53")
     };
     var serviceProvider = new MockServiceProvider(serviceProviderOptions);
     return serviceProvider;
 }
Exemplo n.º 2
0
        public MockServiceProvider(MockServiceProviderOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            m_settingsPropertyStore = options.SettingsPropertyStore;
            m_hostInfo        = options.HostInfo;
            m_connectionInfo  = options.ConnectionInfo;
            m_dhcpInfo        = options.DhcpInfo;
            m_externalAddress = options.ExternalAddress;
        }
Exemplo n.º 3
0
            private static MockServiceProvider CreateServiceProvider()
            {
                var serviceProviderOptions = new MockServiceProviderOptions
                {
                    SettingsPropertyStore = new DictionaryPropertyStore(),
                    HostInfo        = new HostInfo(Guid.NewGuid(), new HostName("myhost"), IPAddress.Parse("11.22.33.44")),
                    ConnectionInfo  = new ConnectionInfo(IPAddress.Parse("22.33.44.55"), new IPNetwork(IPAddress.Parse("22.33.44.00"), 24)),
                    DhcpInfo        = new DhcpInfo(IPAddress.Parse("100.101.102.103"), IPAddress.Parse("200.201.202.203"), "my-domain-name"),
                    ExternalAddress = IPAddress.Parse("50.51.52.53")
                };
                var serviceProvider = new MockServiceProvider(serviceProviderOptions);

                return(serviceProvider);
            }