private void SearchResponseCallBack(SearchResponseArgs e) { //更换逻辑,区分直接的和间接的。 int tmp = 0; bool obj_attribute = false; if (e.Result != null) { tags.Clear(); resources.Clear(); foreach (IRequestObject obj in e.Result) { obj_attribute = e.Result_Attribute[tmp]; if (obj is Tag) { TagItem item = TagItem.CreateTagItem(obj as Tag); if (item.Tag.TagID == null) { item.State = TagItemState.FreeNew; //说明为直接获得。 } else { item.State = TagItemState.FreeImmediate; //说明为间接获得。 } tags.Add(item); } else if (obj is Resource) { ResourceItem item = new ResourceItem(obj as Resource); if (obj_attribute) { //说明为直接获得。 } else { //说明为间接获得。 } resources.Add(item); } else { throw new Exception("New IRequestObject imported!"); } tmp++; } } else { } }
public virtual void Reset() { _pools.Clear(); _poolResourceAddHandlers.Clear(); _poolResourceRemoveHandlers.Clear(); _poolIndexMap.Clear(); }
private void ProcessManifestResources(ResourceCollection resources) => resources.Clear();
public void RemoveResources() { resources.Clear(); }