コード例 #1
0
ファイル: Block.cs プロジェクト: seasailor/designscript
        /// <summary>
        /// Lists the types of geometry in the block
        /// </summary>
        /// <returns>All the type names</returns>
        public string[] ContainedGeometryTypes()
        {
            string kMethodName = "DSBlock.ContainedGeometryTypes";

            if (string.IsNullOrEmpty(Name))
            {
                throw new ArgumentException(string.Format(Properties.Resources.InvalidInput, Name, kMethodName), "blockName");
            }

            IBlockHelper helper = HostFactory.Factory.GetBlockHelper();

            if (null == helper)
            {
                throw new InvalidOperationException(string.Format(Properties.Resources.OperationFailed, kMethodName));
            }

            return(helper.ListContentsOfBlock(Name));
        }