Beispiel #1
0
        public void IncarcaMaterialLaborator(PlainText numeLaborator, Uri continutLaborator)
        {
            //Contract.Requires(numeLaborator != null, "numeLaborator");
            //Contract.Requires(continutLaborator != null, "continutLaborator");
            var laborator = Laboratoare.Valori.FirstOrDefault(c => c.Nume.Equals(numeLaborator));

            if (laborator == null)
            {
                //Laboratorul trebuie creat
                laborator = new Laborator(numeLaborator);
                laborator.LinkContinut = continutLaborator;
                Laboratoare.AdaugaLaborator(laborator);
            }
            else
            {
                //Laboratorul exista
                laborator.ActualizareLinkContinut(continutLaborator);
            }
        }
Beispiel #2
0
 internal void AdaugaLaborator(Laborator laborator)
 {
     //Contract.Requires(laborator != null, "laborator");
     _laboratoare.Add(laborator);
 }