예제 #1
0
        /// <summary>
        /// Checks if the handle is of a particular type.
        /// </summary>
        /// <param name="handle">The handle.</param>
        /// <param name="type">The type.</param>
        /// <returns>True if the handle is exactly of the specified type.</returns>
        public static bool IsTypeOf(IFCAnyHandle handle, IFCEntityType type)
        {
            if (IsNullOrHasNoValue(handle))
            {
                return(false);
            }
            IFCEntityType compareType;

            if (ExporterCacheManager.HandleTypeCache.TryGetValue(handle, out compareType))
            {
                return(compareType == type);
            }
            return(handle.IsTypeOf(type.ToString()));
        }