/// <summary> /// Initializes a new instance of the Filter class. /// </summary> /// <param name="instance">Filter instance.</param> /// <param name="scope">Filter scope.</param> /// <param name="order">The run order.</param> public JobFilter(object instance, JobFilterScope scope, int? order) { if (instance == null) { throw new ArgumentNullException("instance"); } if (order == null) { var mvcFilter = instance as IJobFilter; if (mvcFilter != null) { order = mvcFilter.Order; } } Instance = instance; Order = order ?? DefaultOrder; Scope = scope; }
/// <summary> /// Initializes a new instance of the Filter class. /// </summary> /// <param name="instance">Filter instance.</param> /// <param name="scope">Filter scope.</param> /// <param name="order">The run order.</param> public JobFilter(object instance, JobFilterScope scope, int?order) { if (instance == null) { throw new ArgumentNullException("instance"); } if (order == null) { var mvcFilter = instance as IJobFilter; if (mvcFilter != null) { order = mvcFilter.Order; } } Instance = instance; Order = order ?? DefaultOrder; Scope = scope; }