Ejemplo n.º 1
0
 internal NestedPipelineFeederBase(IPipelineComponentConfig config, IPipelineContext context, IPipeline pipeline)
 {
     Util.ThrowOnNullArgument(pipeline, "pipeline");
     this.Config         = config;
     this.Context        = context;
     this.NestedPipeline = pipeline;
 }
 public static bool ConfigTryParseHelper <T>(IPipelineComponentConfig config, InferenceCommonUtility.TryParseFunction <T> tryParseFunction, string keyName, out T value, IDiagnosticsSession trace, T defaultValue)
 {
     if (!InferenceCommonUtility.ConfigTryParseHelper <T>(config, tryParseFunction, keyName, out value, trace))
     {
         value = defaultValue;
         if (trace != null)
         {
             trace.TraceDebug <string, T>("Defaulting config value referenced by keyName: {0} to: {1}", keyName, defaultValue);
         }
         return(false);
     }
     return(true);
 }
 public static bool ConfigTryParseHelper <T>(IPipelineComponentConfig config, InferenceCommonUtility.TryParseFunction <T> tryParseFunction, string keyName, out T value, IDiagnosticsSession trace)
 {
     value = default(T);
     if (config == null || !tryParseFunction(config[keyName], out value))
     {
         if (trace != null)
         {
             trace.TraceDebug <string>("Failed to parse config value referenced by keyName: {0}.", keyName);
         }
         return(false);
     }
     return(true);
 }
Ejemplo n.º 4
0
 protected BaseComponent(IPipelineComponentConfig config)
 {
     InferenceCommonUtility.ConfigTryParseHelper <bool>(config, new InferenceCommonUtility.TryParseFunction <bool>(bool.TryParse), "AsyncComponent", out this.isAsynchronous, this.DiagnosticsSession, false);
     this.DiagnosticsSession = Microsoft.Exchange.Search.Core.Diagnostics.DiagnosticsSession.CreateComponentDiagnosticsSession("BaseComponent", ExTraceGlobals.SynchronousComponentBaseTracer, (long)this.GetHashCode());
 }
Ejemplo n.º 5
0
 protected InferenceBaseModelWriter(IPipelineComponentConfig config, IPipelineContext context)
 {
     Util.ThrowOnNullArgument(context, "context");
     this.Config  = config;
     this.Context = context;
 }
Ejemplo n.º 6
0
 internal MdbPeopleModelWriter(IPipelineComponentConfig config, IPipelineContext context) : base(config, context)
 {
     this.DiagnosticsSession.ComponentName = "MdbPeopleModelWriter";
     this.DiagnosticsSession.Tracer        = ExTraceGlobals.MdbInferenceModelWriterTracer;
 }
Ejemplo n.º 7
0
 internal NestedSentItemsPipelineFeeder(IPipelineComponentConfig config, IPipelineContext context, IPipeline pipeline) : base(config, context, pipeline)
 {
     this.DiagnosticsSession.Tracer        = ExTraceGlobals.NestedSentItemsPipelineFeederTracer;
     this.DiagnosticsSession.ComponentName = "NestedSentItemsPipelineFeeder";
 }
 public IStartStopPipelineComponent CreateInstance(IPipelineComponentConfig config, IPipelineContext context, IPipeline nestedPipeline)
 {
     throw new NotSupportedException("Doesn't support creating a component that uses nested pipeline");
 }
 public IPipelineComponent CreateInstance(IPipelineComponentConfig config, IPipelineContext context)
 {
     return(new RecipientExtractor());
 }
 public IPipelineComponent CreateInstance(IPipelineComponentConfig config, IPipelineContext context)
 {
     return(new PeopleRelevanceClassifier());
 }
 public IPipelineComponent CreateInstance(IPipelineComponentConfig config, IPipelineContext context)
 {
     return(new MdbPeopleModelWriter(config, context));
 }
Ejemplo n.º 12
0
 public IPipelineComponent CreateInstance(IPipelineComponentConfig config, IPipelineContext context)
 {
     throw new NotSupportedException("Doesn't support creating this component without the nested pipeline");
 }
Ejemplo n.º 13
0
 public IStartStopPipelineComponent CreateInstance(IPipelineComponentConfig config, IPipelineContext context, IPipeline nestedPipeline)
 {
     return(new NestedSentItemsPipelineFeeder(config, context, nestedPipeline));
 }
 public IPipelineComponent CreateInstance(IPipelineComponentConfig config, IPipelineContext context)
 {
     return(new RecipientCacheContactWriter());
 }