public bool Get(string id, Object sender, AssetRetrieved handler) { AssetBase asset = null; if (m_Cache != null) { m_Cache.Get(id); } if (asset != null) { handler.BeginInvoke(id, sender, asset, null, null); return(true); } return(m_AssetService.Get(id, sender, delegate(string assetID, Object s, AssetBase a) { if ((a != null) && (m_Cache != null)) { m_Cache.Cache(a); } handler.BeginInvoke(assetID, s, a, null, null); })); }
public bool Get(string id, Object sender, AssetRetrieved handler) { AssetBase asset = null; if (m_Cache != null) { asset = m_Cache.Get(id); } if (asset != null) { handler.BeginInvoke(id, sender, asset, null, null); return(true); } if (IsHG(id)) { return(m_HGService.Get(id, sender, delegate(string assetID, Object s, AssetBase a) { if (a != null && m_Cache != null) { m_Cache.Cache(a); } handler(assetID, s, a); })); } else { return(m_GridService.Get(id, sender, delegate(string assetID, Object s, AssetBase a) { if (a != null && m_Cache != null) { m_Cache.Cache(a); } handler(assetID, s, a); })); } }
public bool Get(string id, Object sender, AssetRetrieved handler) { AssetBase asset = null; if (m_Cache != null) m_Cache.Get(id); if (asset != null) { handler.BeginInvoke(id, sender, asset, null, null); return true; } return m_AssetService.Get(id, sender, delegate (string assetID, Object s, AssetBase a) { if ((a != null) && (m_Cache != null)) m_Cache.Cache(a); handler.BeginInvoke(assetID, s, a, null, null); }); }
public bool Get(string id, Object sender, AssetRetrieved handler) { AssetBase asset = null; if (m_Cache != null) asset = m_Cache.Get(id); if (asset != null) { handler.BeginInvoke(id, sender, asset, null, null); return true; } if (IsHG(id)) { return m_HGService.Get(id, sender, delegate (string assetID, Object s, AssetBase a) { if (a != null && m_Cache != null) m_Cache.Cache(a); handler(assetID, s, a); }); } else { return m_GridService.Get(id, sender, delegate (string assetID, Object s, AssetBase a) { if (a != null && m_Cache != null) m_Cache.Cache(a); handler(assetID, s, a); }); } }
public bool Get(string id, Object sender, AssetRetrieved handler) { string uri = m_ServerURI + "/assets/" + id; AssetBase asset = null; if (m_Cache != null) asset = m_Cache.Get(id); if (asset == null) { AsynchronousRestObjectRequester. MakeRequest<int, AssetBase>("GET", uri, 0, delegate(AssetBase a) { if (m_Cache != null) m_Cache.Cache(a); handler(id, sender, a); }); } else { handler.BeginInvoke(id, sender, asset, null, null); } return true; }