Check() private method

private Check ( ) : bool
return bool
Exemplo n.º 1
0
Arquivo: Msg.cs Projeto: fhchina/netmq
        public void Copy([NotNull] ref Msg src)
        {
            //  Check the validity of the source.
            if (!src.Check())
            {
                throw new FaultException();
            }

            Close();

            if (m_type == MsgType.Pool)
            {
                //  One reference is added to shared messages. Non-shared messages
                //  are turned into shared messages and reference count is set to 2.
                if (src.m_flags.HasFlag(MsgFlags.Shared))
                {
                    src.m_atomicCounter.Increase(1);
                }
                else
                {
                    src.m_flags |= MsgFlags.Shared;
                    src.m_atomicCounter.Set(2);
                }
            }

            this = src;
        }
Exemplo n.º 2
0
Arquivo: Msg.cs Projeto: fhchina/netmq
        public void Move([NotNull] ref Msg src)
        {
            //  Check the validity of the source.
            if (!src.Check())
            {
                throw new FaultException();
            }

            Close();

            this = src;

            src.InitEmpty();
        }