示例#1
0
 public void AddDataspace(MockDataspace dataspace)
 {
     ExecuteWithLock(() =>
     {
         Dataspaces.Add(dataspace);
         RefreshAll();
     });
 }
示例#2
0
 public void RemoveDataspace(MockDataspace dataspace)
 {
     ExecuteWithLock(() =>
     {
         Dataspaces.Remove(dataspace);
         RefreshAll();
     });
 }
示例#3
0
        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);
                }
            });
        }