private void loadDefault() { defaultResource = new ResourceHandle("default", this); IEvent evt = new BasicEvent(); defaultResource.Load(evt); evt.Wait(); }
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"); } }
public void Dispose() { if (Default != null) { IEvent evt = new BasicEvent(); queue.Add(() => { defaultResource.Unload(evt); defaultResource = null; }); evt.Wait(); } }