IsASupportedModelType() публичный статический Метод

public static IsASupportedModelType ( ModelType modelType ) : bool
modelType ModelType
Результат bool
Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="node1"></param>
        /// <param name="node2"></param>
        /// <param name="material"></param>
        /// <param name="crossSection"></param>
        /// <returns></returns>
        public LinearTruss CreateLinearTruss(IFiniteElementNode node1, IFiniteElementNode node2, IMaterial material, ICrossSection crossSection)
        {
            Guard.AgainstInvalidState(() => { return(!LinearTruss.IsASupportedModelType(this.ModelType)); },
                                      "LinearTruss are not available in a model of type {0}",
                                      this.ModelType);

            LinearTruss newTruss = new LinearTruss(node1, node2, material, crossSection);

            if (this.repository != null)
            {
                this.repository.Add(newTruss);
            }

            return(newTruss);
        }