コード例 #1
0
        /// <summary>
        /// Tests the express where-clause specified in param 'clause'
        /// </summary>
        /// <param name="clause">The express clause to test</param>
        /// <returns>true if the clause is satisfied.</returns>
        public bool ValidateClause(IfcDoorPanelPropertiesClause clause)
        {
            var retVal = false;

            try
            {
                switch (clause)
                {
                case IfcDoorPanelPropertiesClause.ApplicableToType:
                    retVal = (Functions.EXISTS(this /* as IfcPropertySetDefinition*/.DefinesType.ItemAt(0))) && ((Functions.TYPEOF(this /* as IfcPropertySetDefinition*/.DefinesType.ItemAt(0)).Contains("IFC4.IFCDOORTYPE")) || (Functions.TYPEOF(this /* as IfcPropertySetDefinition*/.DefinesType.ItemAt(0)).Contains("IFC4.IFCDOORSTYLE")));
                    break;
                }
            } catch (Exception ex) {
                var log = Validation.ValidationLogging.CreateLogger <Xbim.Ifc4.ArchitectureDomain.IfcDoorPanelProperties>();
                log?.LogError(string.Format("Exception thrown evaluating where-clause 'IfcDoorPanelProperties.{0}' for #{1}.", clause, EntityLabel), ex);
            }
            return(retVal);
        }
コード例 #2
0
        /// <summary>
        /// Tests the express where-clause specified in param 'clause'
        /// </summary>
        /// <param name="clause">The express clause to test</param>
        /// <returns>true if the clause is satisfied.</returns>
        public bool ValidateClause(IfcDoorPanelPropertiesClause clause)
        {
            var retVal = false;

            try
            {
                switch (clause)
                {
                case IfcDoorPanelPropertiesClause.WR31:
                    retVal = Functions.EXISTS(this /* as IfcPropertySetDefinition*/.DefinesType.ItemAt(0)) && (Functions.TYPEOF(this /* as IfcPropertySetDefinition*/.DefinesType.ItemAt(0)).Contains("IFC2X3.IFCDOORSTYLE"));
                    break;
                }
            } catch (Exception ex) {
                var log = Validation.ValidationLogging.CreateLogger <Xbim.Ifc2x3.SharedBldgElements.IfcDoorPanelProperties>();
                log?.LogError(string.Format("Exception thrown evaluating where-clause 'IfcDoorPanelProperties.{0}' for #{1}.", clause, EntityLabel), ex);
            }
            return(retVal);
        }