private bool MatchsCondition(ContentChangedTriggerSchemaV2 schema, EnrichedSchemaEventBase @event) { if (string.IsNullOrWhiteSpace(schema.Condition)) { return(true); } var vars = new ScriptVars { ["event"] = @event }; return(scriptEngine.Evaluate(vars, schema.Condition)); }
private bool MatchsCondition(ContentChangedTriggerSchemaV2 schema, EnrichedSchemaEventBase @event) { if (string.IsNullOrWhiteSpace(schema.Condition)) { return(true); } // Script vars are just wrappers over dictionaries for better performance. var vars = new EventScriptVars { Event = @event }; return(scriptEngine.Evaluate(vars, schema.Condition)); }
private bool MatchsCondition(ContentChangedTriggerSchemaV2 schema, EnrichedSchemaEventBase @event) { return(string.IsNullOrWhiteSpace(schema.Condition) || scriptEngine.Evaluate("event", @event, schema.Condition)); }