示例#1
0
 protected Scraper(IPluginProvision provision,
                   AttachTarget target,
                   string targetType)
     : base(provision)
 {
     this.AttachPoint = target;
     this.TargetType  = targetType;
     this.Directives  = this.GetType()
                        .GetCustomAttributes <DirectiveAttribute>().ToList();
 }
示例#2
0
 protected Scraper(Type pluginType,
                   AttachTarget target,
                   string targetType)
     : this(new StandalonePluginProvision(pluginType), target, targetType)
 {
 }
示例#3
0
 /// <summary>
 /// Specifies a directive on a <see cref="IScraper"/> that determines
 /// when and what information it must have access to before it is run.
 /// </summary>
 /// <param name="target">All seeds of this type are examined when evaluating the directive.</param>
 /// <param name="directive">The directive action, whether or not this directive means to run
 /// the <see cref="IScraper"/> if the specified child type is available on
 /// the <see cref="Target"/>, or whether not exclude and not run if the specified
 /// child type exists on the target.</param>
 /// <param name="type"> The child type to evaluate this directive on.</param>
 public DirectiveAttribute(AttachTarget target, Directive directive, string type)
 {
     this.Target    = target;
     this.Directive = directive;
     this.Type      = type;
 }