Ejemplo n.º 1
0
 private static void ReadProperties(DiscoveryServer server, API rm)
 {
     server.Separator         = rm.ReadString("EntriesSeparator", Separator);
     server.EntryFormat       = rm.ReadString("EntryFormat", EntryFormat).Replace("\n", "");
     server.EntriesMode       = rm.ReadInt("EntriesMode", EntryMode);
     server.NoDevicesDetected = rm.ReadString("NoDevicesDetected", "No devices detected");
 }
Ejemplo n.º 2
0
        public static void Initialize(ref IntPtr data, IntPtr rm)
        {
            API api    = rm;
            var server = new DiscoveryServer(api.LogF)
            {
                Api = api
            };
            var port = api.ReadInt("ListeningPort", 8888);

            server.Init(port);
            ReadProperties(server, api);

            data = GCHandle.ToIntPtr(GCHandle.Alloc(server));
        }