예제 #1
0
        public void SaveOrUpdate(CloudUpdate updateData)
        {
            bool  cloudAdded = false;
            Cloud cloud;

            if (false == clouds.TryGetValue(updateData.ID, out cloud))
            {
                cloud            = new Cloud(updateData.ID);
                clouds[cloud.ID] = cloud;
                cloudAdded       = true;
            }
            cloud.ServerName = updateData.ServerName;
            cloud.Url        = updateData.ServerUrl;
            cloud.Email      = updateData.Email;
            cloud.Password   = updateData.Password;
            if (cloudAdded)
            {
                OnCloudAdded(cloud);
            }
            else
            {
                OnCloudChanged(cloud);
            }
        }
예제 #2
0
 public void SaveOrUpdate(CloudUpdate updateData)
 {
     bool cloudAdded = false;
     Cloud cloud;
     if (false == clouds.TryGetValue(updateData.ID, out cloud))
     {
         cloud = new Cloud(updateData.ID);
         clouds[cloud.ID] = cloud;
         cloudAdded = true;
     }
     cloud.ServerName = updateData.ServerName;
     cloud.Url        = updateData.ServerUrl;
     cloud.Email      = updateData.Email;
     cloud.Password   = updateData.Password;
     if (cloudAdded)
     {
         OnCloudAdded(cloud);
     }
     else
     {
         OnCloudChanged(cloud);
     }
 }