public static int CompareByName(CapabilityLookup x, CapabilityLookup y)
        {
            if (x == null || y == null || x.Name == null || y.Name == null)
            {
                return(0);
            }

            return(x.Name.CompareTo(y.Name));
        }
Ejemplo n.º 2
0
        public CapabilityLookup GenerateCapability(string pCode, string pName)
        {
            if (String.IsNullOrWhiteSpace(pCode) || String.IsNullOrWhiteSpace(pName))
            {
                return(null);
            }

            CapabilityLookup result = this.Capabilities.FirstOrDefault((i) => (i.Code == pCode && i.Name == pName));

            if (result == null)
            {
                result = new CapabilityLookup(pCode, pName);
                this.Capabilities.Add(result);
            }
            return(result);
        }
Ejemplo n.º 3
0
        public void AddITIC(InfrastructureLookup pInfrastructure, CapabilityLookup pCapability, LogicalSystemGroupLookup pLogicalSystemGroup)
        {
            if (pInfrastructure == null || pCapability == null || pLogicalSystemGroup == null)
            {
                return;
            }

            //ITIC code = this.Codes.FirstOrDefault((itic) => (itic.Infrastructure == pInfrastructure && itic.Capability == pCapability && itic.LogicalSystemGroup == pLogicalSystemGroup));
            //if (code == null)
            //{
            //    code = new ITIC(pInfrastructure, pCapability, pLogicalSystemGroup);
            //    this.Codes.Add(code);
            //}

            ITIC code = new ITIC(pInfrastructure, pCapability, pLogicalSystemGroup);

            lock (_codesLocker)
            {
                this.Codes.Add(code);
            }
        }
Ejemplo n.º 4
0
 public ITIC(InfrastructureLookup pInfrastructure, CapabilityLookup pCapability, LogicalSystemGroupLookup pLogicalSystemGroup)
 {
     this.Infrastructure     = pInfrastructure;
     this.Capability         = pCapability;
     this.LogicalSystemGroup = pLogicalSystemGroup;
 }