MethodCalledTwice() static private méthode

static private MethodCalledTwice ( string method ) : InvalidOperationException
method string
Résultat System.InvalidOperationException
Exemple #1
0
        internal void CompareExchangeOwner(object owner, string method)
        {
            object obj2 = Interlocked.CompareExchange(ref this._owner, null, owner);

            if (obj2 != owner)
            {
                if (obj2 != null)
                {
                    throw ADP.IncorrectAsyncResult();
                }
                throw ADP.MethodCalledTwice(method);
            }
        }