public void AddResource(AssetData res) { res.package = this; resources.Enqueue(res.id, res); resourcesList.Add(res); switch (res.type) { case ResourceComponentType.component: components.Add(res); if (res.exported) { exportComponents.Add(res); } break; case ResourceComponentType.sound: sounds.Add(res); break; case ResourceComponentType.image: images.Add(res); break; } }
internal Address GetNextAddress() { lock (this._connections.SyncRoot) { var node = loadBalancerQueue.Dequeue(); if (node == null) { var connection = GetAnyConnection(); if (connection == null || !connection.IsConnected) { return(null); } else { foreach (Address ad in this._connections.Keys) { loadBalancerQueue.Enqueue(ad); } } } Connection conn = _connections[node] as Connection; if (conn == null || !conn.IsConnected) { conn = GetAnyConnection(); if (conn == null || !conn.IsConnected) { return(null); } } else { loadBalancerQueue.Enqueue(node); } return(conn.ServerAddress); } }
public void AddResource(ResourceComponent res) { res.package = this; resources.Enqueue(res.id, res); if (res.type == ResourceComponentType.component) { components.Add(res); if (res.exported) { exportComponents.Add(res); } } else if (res.type == ResourceComponentType.sound) { sounds.Add(res); } }
public void AddPackage(Package package) { packageList.Add(package); packages.Enqueue(package.id, package); packagesByName.Add(package.name, package); }