コード例 #1
0
ファイル: LoadCollection.cs プロジェクト: lulzzz/Nucleus
        /// <summary>
        /// Get all loads in this collection that belong to the specified load case
        /// </summary>
        /// <param name="loadCase"></param>
        /// <returns></returns>
        public LoadCollection AllInCase(LoadCase loadCase)
        {
            var result = new LoadCollection();

            foreach (Load load in this)
            {
                if (load.Case == loadCase)
                {
                    result.Add(load);
                }
            }
            return(result);
        }
コード例 #2
0
ファイル: LoadCollection.cs プロジェクト: lulzzz/Nucleus
        /// <summary>
        /// Get all loads in this collection which are applied to the specified
        /// model object.
        /// </summary>
        /// <typeparam name="TObj"></typeparam>
        /// <param name="mObj"></param>
        /// <returns></returns>
        public LoadCollection AllAppliedTo <TObj>(TObj mObj)
            where TObj : ModelObject
        {
            var result = new LoadCollection();

            foreach (Load load in this)
            {
                if (load.IsAppliedTo(mObj))
                {
                    result.Add(load);
                }
            }
            return(result);
        }