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

            return(x.Name.CompareTo(y.Name));
        }
Exemple #2
0
        public InfrastructureLookup GenerateInfrastructure(string pCode, string pName)
        {
            if (String.IsNullOrWhiteSpace(pCode) || String.IsNullOrWhiteSpace(pName))
            {
                return(null);
            }

            InfrastructureLookup result = this.Infrastructures.FirstOrDefault((i) => (i.Code == pCode && i.Name == pName));

            if (result == null)
            {
                result = new InfrastructureLookup(pCode, pName);
                this.Infrastructures.Add(result);
            }
            return(result);
        }
Exemple #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);
            }
        }
Exemple #4
0
 public ITIC(InfrastructureLookup pInfrastructure, CapabilityLookup pCapability, LogicalSystemGroupLookup pLogicalSystemGroup)
 {
     this.Infrastructure     = pInfrastructure;
     this.Capability         = pCapability;
     this.LogicalSystemGroup = pLogicalSystemGroup;
 }