Beispiel #1
0
 public void AddReplicas(List <ServerData> replicasList)
 {
     foreach (ServerData replica in replicasList)
     {
         ReplicasList.Add(replica);
     }
 }
Beispiel #2
0
        public bool Equals(View otherView)
        {
            if (otherView == null)
            {
                return(false);
            }

            int               otherViewId       = otherView.ViewId;
            string            otherManagerUId   = otherView.ManagerUId;
            List <ServerData> otherReplicasList = otherView.ReplicasList;

            if (ViewId == otherViewId && ManagerUId == otherManagerUId && ReplicasList.Equals(otherReplicasList))
            {
                return(true);
            }
            return(false);
        }
Beispiel #3
0
 public void AddReplica(ServerData newReplica)
 {
     ReplicasList.Add(newReplica);
 }
Beispiel #4
0
 public ServerData FindByName(string serverName)
 {
     return(ReplicasList.Find(server => string.Equals(server.ServerName, serverName)));
 }
Beispiel #5
0
 public ServerData Find(string serverUId)
 {
     return(ReplicasList.Find(server => string.Equals(server.ServerUId, serverUId)));
 }
Beispiel #6
0
 public void Remove(ServerData serverData)
 {
     ReplicasList.Remove(serverData);
 }
Beispiel #7
0
 public void Add(ServerData serverData)
 {
     ReplicasList.Add(serverData);
 }