Exemplo n.º 1
0
 /// <summary>
 /// Find matching options records
 /// </summary>
 public IEnumerable <BomStructureOptionsRecord> MatchingRecords(AdminShell.SemanticId semId)
 {
     foreach (var rec in Records)
     {
         if (rec.AllowSubmodelSemanticId != null)
         {
             foreach (var x in rec.AllowSubmodelSemanticId)
             {
                 if (semId != null && semId.Matches(x))
                 {
                     yield return(rec);
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
        public GenericFormsOptionsRecord MatchRecordsForSemanticId(AdminShell.SemanticId sem)
        {
            // check for a record in options, that matches Submodel
            GenericFormsOptionsRecord res = null;

            if (Records != null)
            {
                foreach (var rec in Records)
                {
                    if (rec?.FormSubmodel?.KeySemanticId != null)
                    {
                        if (sem != null && sem.Matches(rec.FormSubmodel.KeySemanticId))
                        {
                            res = rec;
                            break;
                        }
                    }
                }
            }
            return(res);
        }