public Simulator.Infrastructure.Repository.SimulationStatus InicializeModuleByStream(System.IO.Stream XMLInputstream)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(PR_Descriptor));
            try
            {
                using (XmlReader reader = XmlReader.Create(XMLInputstream))
                {
                    InputDescriptor = (PR_Descriptor)serializer.Deserialize(reader);
                }
            }
            catch (Exception e)
            {
                return SimulationStatus.Corrupted;
            }

            try
            {
                SimulatorViewModel.SimulatorModel.CreateSimulatorDomain(InputDescriptor);
                SimulatorViewModel.InputDescriptor = InputDescriptor;
            }
            catch (Exception e)
            {
                return SimulationStatus.Corrupted;
            }


            return SimulationStatus.Runnable;
        }
 public void CreateSimulatorDomain(PR_Descriptor descriptor)
 {
     PageActionSequence = new ObservableCollection<PageActionBase>(descriptor.PageActionSequence.Select(i => (PageActionBase)i.Clone()).ToList());
     CountOfPagesForProcess = descriptor.CountOfPagesForProcess;
     Metrics = new Metrics(descriptor.MemoryAccessTime,descriptor.PageFaultServiceTime);
     LoadPageFaultAlgorithm(descriptor.PageReplacerAlgorithm);
 }