Esempio n. 1
0
        /// <summary>
        /// Creates a software system (location is unspecified) and adds it to the model
        /// (unless one exists with the same name already).
        /// </summary>
        /// <param name="location">The location of the software system (e.g. internal, external, etc)</param>
        /// <param name="name">The name of the software system</param>
        /// <param name="description">A short description of the software syste.</param>
        /// <returns>the SoftwareSystem instance created and added to the model (or null)</returns>
        public SoftwareSystem AddSoftwareSystem(Location location, string name, string description)
        {
            if (GetSoftwareSystemWithName(name) == null)
            {
                SoftwareSystem softwareSystem = new SoftwareSystem();
                softwareSystem.Location    = location;
                softwareSystem.Name        = name;
                softwareSystem.Description = description;

                SoftwareSystems.Add(softwareSystem);

                softwareSystem.Id = idGenerator.GenerateId(softwareSystem);
                AddElementToInternalStructures(softwareSystem);

                return(softwareSystem);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Workflow example for Departments and Groups.\n");

            SoftwareSystems softwareSys = new SoftwareSystems();
            MIT             mit         = new MIT();

            IPZ_33 group33 = new IPZ_33();
            IPZ_32 group32 = new IPZ_32();

            softwareSys.Subscribe(group33);
            softwareSys.Subscribe(group32);

            softwareSys.Notify();

            softwareSys.Unsubscribe(group32);

            mit.Subscribe(group33);

            mit.Notify();

            mit.Unsubscribe(group33);
            Console.ReadLine();
        }