You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using BPA.Helper;
- using BPASmart.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Reflection;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmart.Server
- {
- public class Main
- {
- private volatile static Main _Instance;
- public static Main GetInstance => _Instance ?? (_Instance = new Main());
- private Main() { }
-
- public void Init()
- {
- Json<CommunicationPar>.Read();
- Assembly.GetExecutingAssembly().GetTypes()?.ToList()?.ForEach(item =>
- {
- if (item.GetInterfaces().Contains(typeof(IServer)))
- {
- (Activator.CreateInstance(item) as IServer)?.Init();
- }
- });
- }
-
- }
- }
|