Example #1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public MDSServer()
 {
     _settings = MDSSettings.Instance;
     _serverGraph = new MDSServerGraph();
     _clientApplicationList = new MDSClientApplicationList();
     _mdsManager = new MDSController("MDSController");
     _storageManager = StorageManagerFactory.CreateStorageManager();
     _routingTable = new RoutingTable();
     _communicationLayer = new CommunicationLayer();
     _organizationLayer = new OrganizationLayer(_communicationLayer, _storageManager, _routingTable, _serverGraph, _clientApplicationList, _mdsManager);
     _mdsManager.OrganizationLayer = _organizationLayer;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="communicationLayer">Reference to the Communication Layer</param>
 /// <param name="storageManager">Reference to the Storage Manager</param>
 /// <param name="routingTable">Reference to the routing table</param>
 /// <param name="serverGraph">Reference to server graph</param>
 /// <param name="clientApplicationList">Reference to application list</param>
 /// <param name="mdsManager">Reference to MDS Manager object</param>
 public OrganizationLayer(CommunicationLayer communicationLayer, IStorageManager storageManager, RoutingTable routingTable, MDSServerGraph serverGraph, MDSClientApplicationList clientApplicationList, MDSController mdsManager)
 {
     _settings = MDSSettings.Instance;
     _communicationLayer = communicationLayer;
     _storageManager = storageManager;
     _routingTable = routingTable;
     _serverGraph = serverGraph;
     _clientApplicationList = clientApplicationList;
     _mdsManager = mdsManager;
     _waitingMessages = new SortedList<string, WaitingMessage>();
     PrepareCommunicationLayer();
 }