예제 #1
0
        private void loadDefault()
        {
            defaultResource = new ResourceHandle("default", this);
            IEvent evt = new BasicEvent();

            defaultResource.Load(evt);
            evt.Wait();
        }
예제 #2
0
        private void loadDefault()
        {
            defaultResource = new ResourceHandle("default", this);
            IEvent evt = new BasicEvent();

            defaultResource.Load(evt);
            EventState state = evt.Wait();

            if (state == EventState.Failed)
            {
                throw new NotSupportedException("Default Resource was not loaded properly");
            }
        }
예제 #3
0
        public void Dispose()
        {
            if (Default != null)
            {
                IEvent evt = new BasicEvent();

                queue.Add(() =>
                {
                    defaultResource.Unload(evt);
                    defaultResource = null;
                });
                evt.Wait();
            }
        }