コード例 #1
0
        internal static bool TryGetMetaTable(INamingContainer control, HttpContextBase context, out MetaTable table)
        {
            if (control == null)
            {
                throw new ArgumentNullException("control");
            }

            table = MetaTableHelper.GetTableFromMapping(context, control);
            return(table != null);
        }
コード例 #2
0
        internal static bool TryGetMetaTable(IDataSource dataSource, HttpContextBase context, out MetaTable table)
        {
            if (dataSource == null)
            {
                throw new ArgumentNullException("dataSource");
            }

            Debug.Assert(context != null);

            table = MetaTableHelper.GetTableFromMapping(context, dataSource);
            if (table == null)
            {
                var dynamicDataSource = dataSource as IDynamicDataSource;
                if (dynamicDataSource != null)
                {
                    table = MetaTableHelper.GetTableFromDynamicDataSource(dynamicDataSource);
                }
            }
            return(table != null);
        }