Пример #1
0
        public void RegisterSoftwareComponent(SoftwareComponent component)
        {
            string componentName = component.Name;
            string componentType = component.Type;

            this.softwareComonents.Add(componentName, component);

            this.CountTypes(componentType, 1);
        }
Пример #2
0
        public void RegisterSoftware(string hardwareName, SoftwareComponent software)
        {
            string softwareName = software.Name;

            if (this.hardwareComponents.ContainsKey(hardwareName))
            {
                if (this.hardwareComponents[hardwareName].HasCapacityAndMemoryForGivenSoftware(software))
                {
                    this.hardwareComponents[hardwareName].RegisterSoftwareComponent(software);
                }
            }
        }
Пример #3
0
 public bool HasCapacityAndMemoryForGivenSoftware(SoftwareComponent software)
 {
     return this.AvailableCapacity >= software.Capacity && this.AvailableMemory >= software.Memory;
 }