Esempio n. 1
0
        public dataModel.Category GetPropertyCategory(string propId)
        {
            dataModel.Category retVal = null;
            var propSet = PropertySets.FirstOrDefault(x => x.PropertySetProperties.Any(y => y.PropertyId == propId));

            if (propSet != null)
            {
                var categoryId = Categories.Where(x => x.PropertySetId == propSet.Id)
                                 .Select(x => x.Id).FirstOrDefault();
                if (categoryId != null)
                {
                    retVal = GetCategoryById(categoryId);
                }
            }
            return(retVal);
        }
Esempio n. 2
0
        public dataModel.Catalog GetPropertyCatalog(string propId)
        {
            dataModel.Catalog retVal = null;
            var propSet = PropertySets.FirstOrDefault(x => x.PropertySetProperties.Any(y => y.PropertyId == propId));

            if (propSet != null)
            {
                var catalogId = Catalogs.OfType <dataModel.Catalog>()
                                .Where(x => x.PropertySetId == propSet.Id)
                                .Select(x => x.Id).FirstOrDefault();
                if (catalogId != null)
                {
                    retVal = GetCatalogById(catalogId) as dataModel.Catalog;
                }
            }
            return(retVal);
        }
Esempio n. 3
0
 /// <summary>
 /// Returns the propertyset of the specified name, null if it does not exist
 /// </summary>
 /// <param name="pSetName"></param>
 /// <param name="caseSensitive"></param>
 /// <returns></returns>
 public IfcPropertySet GetPropertySet(string pSetName, bool caseSensitive = true)
 {
     return(PropertySets.FirstOrDefault(ps => string.Compare(ps.Name, pSetName, !caseSensitive) == 0));
 }