public void AddDataspace(MockDataspace dataspace) { ExecuteWithLock(() => { Dataspaces.Add(dataspace); RefreshAll(); }); }
public void RemoveDataspace(MockDataspace dataspace) { ExecuteWithLock(() => { Dataspaces.Remove(dataspace); RefreshAll(); }); }
public void RenameDataspace(string dataspaceName) { ExecuteWithLock(() => { RemoveDataspace(Dataspace); RemoveDataspace(DefaultDataspace); Dataspace.SetName(dataspaceName); if (string.IsNullOrEmpty(dataspaceName)) { DefaultDataspace = Dataspace; } else { DefaultDataspace = new MockDataspace(); } AddDataspace(DefaultDataspace); if (!string.IsNullOrEmpty(dataspaceName)) { AddDataspace(Dataspace); } }); }