示例#1
0
        static void Main(string[] args)
        {
            ServerSettings     registrySettings  = ServerSettings.LoadSettings();
            RegistryHttpServer registryServer    = new RegistryHttpServer(registrySettings);
            FileBasedRegistry  fileBasedRegistry = new FileBasedRegistry();

            fileBasedRegistry.StartDiscovery();
            registryServer.SetRegistryProvider(fileBasedRegistry);
            registryServer.Run();
        }
示例#2
0
文件: Program.cs 项目: i-Asset/basyx
        private static void LoadRegistry()
        {
            ServerSettings registrySettings = ServerSettings.CreateSettings();

            registrySettings.ServerConfig.Hosting = new HostingConfiguration()
            {
                Urls = new List <string>()
                {
                    "http://localhost:4999"
                }
            };

            RegistryHttpServer registryServer    = new RegistryHttpServer(registrySettings);
            FileBasedRegistry  fileBasedRegistry = new FileBasedRegistry();

            registryServer.SetRegistryProvider(fileBasedRegistry);
            registryServer.RunAsync();
        }