Ejemplo n.º 1
0
        internal void SetOnChangedCallback(IConsoleVariable consoleVariable, FConsoleVariableDelegate callback)
        {
            if (consoleVariable == null)
            {
                return;
            }

            ManagedVariableChangedHandler handler = new ManagedVariableChangedHandler(callback);

            managedVariableOnChangedHandlers[consoleVariable.Address] = handler;
            Native_IConsoleVariable.SetOnChangedCallback(consoleVariable.Address, handler.NativeCallback);
        }
Ejemplo n.º 2
0
            private void OnVariableChanged(IntPtr consoleVariablePtr)
            {
                IConsoleVariable consoleVariable = null;

                if (consoleVariablePtr != IntPtr.Zero)
                {
                    consoleVariable = new IConsoleVariable(consoleVariablePtr);
                }

                if (Handler != null)
                {
                    Handler(consoleVariable);
                }
            }