SetProp() private méthode

private SetProp ( IntPtr hwnd, string lpString, int hData ) : int
hwnd System.IntPtr
lpString string
hData int
Résultat int
Exemple #1
0
        /// <summary>
        ///     Registers the instance to recieve messages from a named channel.
        /// </summary>
        /// <param name = "channelName">The channel name to listen on.</param>
        public void RegisterChannel(string channelName)
        {
            Validate.That(channelName).IsNotNullOrEmpty();

            if (!disposed)
            {
                lock (disposeLock)
                {
                    if (!disposed)
                    {
                        Native.SetProp(Handle, GetChannelKey(channelName), (int)Handle);
                        return;
                    }
                }
            }
            throw new ObjectDisposedException("IXDListener", "This instance has been disposed.");
        }
Exemple #2
0
        public void RegisterChannel(string channelName)
        {
            channelName.Requires("channelName").IsNotNullOrWhiteSpace();

            if (disposed)
            {
                throw new ObjectDisposedException("IXDListener", "This instance has been disposed.");
            }

            lock (disposeLock)
            {
                if (disposed)
                {
                    throw new ObjectDisposedException("IXDListener", "This instance has been disposed.");
                }

                Native.SetProp(Handle, GetChannelKey(channelName), (int)Handle);
            }
        }