コード例 #1
0
        public IQueryResolver Instantiate(QueryResolverArgs args)
        {
            if (args is AssemblyQueryResolverArgs)
            {
                return(new AssemblyQueryResolver((AssemblyQueryResolverArgs)args));
            }
            else if (args is ExternalFileQueryResolverArgs)
            {
                return(new ExternalFileQueryResolver((ExternalFileQueryResolverArgs)args));
            }
            else if (args is EmbeddedQueryResolverArgs)
            {
                return(new EmbeddedQueryResolver((EmbeddedQueryResolverArgs)args));
            }
            else if (args is ReportDataSetQueryResolverArgs)
            {
                return(new ReportDataSetQueryResolver((ReportDataSetQueryResolverArgs)args));
            }
            else if (args is SharedDataSetQueryResolverArgs)
            {
                return(new SharedDataSetQueryResolver((SharedDataSetQueryResolverArgs)args));
            }
            else if (args is DbCommandQueryResolverArgs) //TODO Remove this one for NBi 2.x
            {
                return(new DbCommandQueryResolver((DbCommandQueryResolverArgs)args));
            }

            throw new ArgumentException();
        }
コード例 #2
0
 public QueryResolver(QueryResolverArgs args)
 {
     this.args = args;
 }