Microsoft.ManagementConsole.AsyncDelegateQueue.Initialize C# (CSharp) Method

Initialize() public method

public Initialize ( ISnapInPlatform snapInPlatform ) : void
snapInPlatform ISnapInPlatform
return void
        public void Initialize(ISnapInPlatform snapInPlatform)
        {
            if (snapInPlatform == null)
            {
                throw new ArgumentNullException("snapInPlatform");
            }
            AsyncDelegate[] array = null;
            lock (this.SyncRoot)
            {
                this._snapInPlatform = snapInPlatform;
                array = new AsyncDelegate[this._pendingDelegates.Values.Count];
                this._pendingDelegates.Values.CopyTo(array, 0);
                this._pendingDelegates.Clear();
            }
            if (array != null)
            {
                foreach (AsyncDelegate delegate2 in array)
                {
                    delegate2.Execute(false);
                }
            }
        }