public FormatResultsResultProcessor(SearchSPIndexCmdlet cmdlet) :
     base(cmdlet)
 {
     if (IsEndOfPipeline())
     {
         formatter = new Helpers.ConsoleFormatter(cmdlet);
         formatter.FormatDividerLine();
     }
 }
Beispiel #2
0
        public static ExceptionHandler Create(SearchSPIndexCmdlet cmdlet, Exception ex)
        {
            ExceptionHandler handler = null;

            if (ex.Message.Contains("HTTP 401"))
            {
                handler = new HTTP401ExceptionHandler(cmdlet);
            }
            else if (ex.Message.Contains("An existing connection was forcibly closed by the remote host"))
            {
                handler = new ForciblyClosedExceptionHandler(cmdlet);
            }
            else
            {
                handler = new DefaultExceptionHandler();
            }

            return(handler);
        }
Beispiel #3
0
        public override bool HandleException(Exception ex, SearchQueryRequest searchQueryRequest)
        {
            switch (searchQueryRequest.AuthenticationType)
            {
            case AuthenticationType.SPO:
                UserNotification();
                Cmdlet.SPOLegacyLogin(searchQueryRequest);
                break;

            case AuthenticationType.SPOManagement:
                UserNotification();
                SearchSPIndexCmdlet.AdalLogin(searchQueryRequest, false);
                break;

            default:
                return(false);
            }

            return(true);
        }
 public RankContributionResultProcessor(SearchSPIndexCmdlet cmdlet) :
     base(cmdlet)
 {
 }
Beispiel #5
0
 public AbstractQueryResultProcessor(SearchSPIndexCmdlet cmdlet)
 {
     this.Cmdlet  = cmdlet;
     retryHandler = new RetryHandler(Cmdlet);
 }
Beispiel #6
0
 public RankDetailResultProcessor(SearchSPIndexCmdlet cmdlet) :
     base(cmdlet)
 {
 }
Beispiel #7
0

        
Beispiel #8
0
 public AllResultsResultProcessor(SearchSPIndexCmdlet cmdlet) :
     base(cmdlet)
 {
 }
Beispiel #9
0
 protected BaseRankDetailResultProcessor(SearchSPIndexCmdlet cmdlet) :
     base(cmdlet)
 {
 }
Beispiel #10
0
 public ForciblyClosedExceptionHandler(SearchSPIndexCmdlet cmdlet) : base(cmdlet)
 {
 }
Beispiel #11
0
 public HTTP401ExceptionHandler(SearchSPIndexCmdlet cmdlet) : base(cmdlet)
 {
 }
Beispiel #12
0
 public AllPropertiesInlineResultProcessor(SearchSPIndexCmdlet cmdlet, SearchQueryRequest searchQueryRequest) :
     base(cmdlet, searchQueryRequest)
 {
     MaxRows = 1;
 }
        public static IQueryResultProcessor SelectQueryResultProcessor(ResultProcessor type, SearchSPIndexCmdlet cmdlet, SearchQueryRequest searchQueryRequest)
        {
            IQueryResultProcessor qrp = null;

            switch (type)
            {
            case ResultProcessor.Raw:
                qrp = new RawResultProcessor(cmdlet);
                break;

            case ResultProcessor.Primary:
                qrp = new PrimaryResultsResultProcessor(cmdlet);
                break;

            case ResultProcessor.All:
                qrp = new AllResultsResultProcessor(cmdlet);
                break;

            case ResultProcessor.Refiners:
                qrp = new RefinerResultProcessor(cmdlet);
                break;

            case ResultProcessor.Basic:
                qrp = new BasicResultProcessor(cmdlet);
                break;

            case ResultProcessor.BasicAll:
                qrp = new BasicAllResultProcessor(cmdlet);
                break;

            case ResultProcessor.RankXML:
                qrp = new RankXMLResultProcessor(cmdlet);
                break;

            case ResultProcessor.RankDetail:
                qrp = new RankDetailResultProcessor(cmdlet);
                break;

            case ResultProcessor.ExplainRank:
                qrp = new ExplainRankResultProcessor(cmdlet);
                break;

            case ResultProcessor.RankContribution:
                qrp = new RankContributionResultProcessor(cmdlet);
                break;

            case ResultProcessor.AllProperties:
                qrp = new AllPropertiesResultProcessor(cmdlet, searchQueryRequest);
                break;

            case ResultProcessor.AllPropertiesInline:
                qrp = new AllPropertiesInlineResultProcessor(cmdlet, searchQueryRequest);
                break;

            case ResultProcessor.ManagedProperties:
                qrp = new ManagedPropertiesResultProcessor(cmdlet, searchQueryRequest);
                break;

            case ResultProcessor.CrawledProperties:
                qrp = new CrawledPropertiesResultProcessor(cmdlet, searchQueryRequest);
                break;

            case ResultProcessor.FormatResults:
                qrp = new FormatResultsResultProcessor(cmdlet);
                break;

            default:
                throw new NotImplementedException("No result processor match " + type);
            }

            return(qrp);
        }
 public ExplainRankResultProcessor(SearchSPIndexCmdlet cmdlet) :
     base(cmdlet)
 {
 }
Beispiel #15
0
 public BaseExceptionHandler(SearchSPIndexCmdlet cmdlet)
 {
     Cmdlet = cmdlet;
 }
Beispiel #16
0
 public ManagedPropertiesResultProcessor(SearchSPIndexCmdlet cmdlet, SearchQueryRequest searchQueryRequest) :
     base(cmdlet)
 {
     this.request = searchQueryRequest;
 }
Beispiel #17
0
 public RetryHandler(SearchSPIndexCmdlet cmdlet) : base(cmdlet)
 {
 }
Beispiel #18
0
 public BasicResultProcessor(SearchSPIndexCmdlet cmdlet) :
     base(cmdlet)
 {
 }
Beispiel #19
0
 public PrimaryResultsResultProcessor(SearchSPIndexCmdlet cmdlet) :
     base(cmdlet)
 {
 }