コード例 #1
0
        //-----------------------------------------------------------------------------
        // Construction
        //-----------------------------------------------------------------------------

        public static Manager Initialize()
        {
            var instance = Instance;

            if (instance != null)
            {
                return(instance);
            }

            var manager = NativeToManagedMap.GetOrCreate(NativeMethods.manager_create());

            // add the watcher for the events
            manager.AddWatcher(manager.OnNotificationFromUnmanaged, null);

            return(manager);
        }
コード例 #2
0
ファイル: Options.cs プロジェクト: mattleibow/OpenZWave.NET
 public static Options Initialize(string configPath, string userPath, string commandLine) =>
 NativeToManagedMap.GetOrCreate(NativeMethods.options_create(configPath, userPath, commandLine));