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

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

            LogicalSystemGroupLookup result = this.LogicalSystemGroups.FirstOrDefault((i) => (i.Code == pCode && i.Name == pName));

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