public void RemoveAll_ShouldRemoveAllValuesAndTheKey() { _target.Add("A", "B"); _target.Add("A", "C"); _target.RemoveAll("A"); Assert.False(_target.ContainsKey("A")); }
public bool RemoveClipFromPath(string a_rClipPath, bool a_bRemoveDependencies) { string rClipGUID; if (m_oClipPathGUIDDict.TryGetValue(a_rClipPath, out rClipGUID)) { if (a_bRemoveDependencies) { m_oTextureGUIDClipGUIDsMultiDict.RemoveAll(rClipGUID); } m_oClipPathGUIDDict.Remove(a_rClipPath); EditorUtility.SetDirty(this); return(true); } return(false); }
public bool RemoveAtlasFromPath(string a_rAtlasPath, bool a_bRemoveDependencies) { string rAtlasGUID; if (m_oAtlasPathGUIDDict.TryGetValue(a_rAtlasPath, out rAtlasGUID)) { if (a_bRemoveDependencies) { string[] rSpritePrefabGUIDs = this.GetSpritePrefabGUIDsUsingThisAtlas(rAtlasGUID); foreach (string rSpritePrefabGUID in rSpritePrefabGUIDs) { this.RemoveSpritePrefabUsingAtlas(rSpritePrefabGUID, rAtlasGUID); } m_oTextureGUIDAtlasGUIDsMultiDict.RemoveAll(rAtlasGUID); } m_oAtlasPathGUIDDict.Remove(a_rAtlasPath); EditorUtility.SetDirty(this); return(true); } return(false); }
/// <summary> /// De-annotates a vertex using a specific marker /// </summary> /// <param name="vertex">The vertex</param> /// <param name="marker">The symbolic marker</param> public virtual void Deannotate(object vertex) { annotations.RemoveAll(vertex); }