コード例 #1
0
 /// <summary>
 /// Wait for resources to become available.
 /// </summary>
 /// <param name="Wait">Supplies true to perform a blocking wait, else
 /// false to return immediately with the current availability status.
 /// </param>
 /// <returns>True if the resources are available to be accessed, else
 /// false if they are not yet loaded.</returns>
 public bool WaitForResourcesLoaded(bool Wait)
 {
     if (_resourcesLoaded)
     {
         return(true);
     }
     return(ResourcesLoadedEvent.WaitOne(Wait ? Timeout.Infinite : 0));
 }
コード例 #2
0
        /// <summary>
        /// Invoked to perform cleanup of the object.
        /// </summary>
        /// <param name="Disposing">Supplies true if cleanup is occuring for
        /// IDisposable.Dispose(), else false if cleanup is occuring for
        /// finalization (which must have skippsed IDisposable.Dispose() as the
        /// normal Dispose() path suppresses finalization).</param>
        private void Dispose(bool Disposing)
        {
            if (!Disposed)
            {
                if (Disposing)
                {
                    //
                    // Clean up managed resources.
                    //

                    ResourcesLoadedEvent.Dispose();
                }

                //
                // Clean up unmanaged resources.
                //

                Disposed = true;
            }
        }
コード例 #3
0
 /// <summary>
 /// Mark resources as fully loaded after initialization completes.
 /// </summary>
 internal void SetResourcesLoaded()
 {
     ResourcesLoadedEvent.Set();
     _resourcesLoaded = true;
 }