public void Init( SchedulerTaskScriptDependencies dependencies, ITaskSettings settings, ScriptFlow flow, ScriptUtility utils ) { this.x = utils; this.Settings = settings; this.Flow = flow; this.Dependencies = dependencies; if (dependencies!=null && dependencies.GetType() != DependencyClassType) throw new InvalidOperationException("Wrong dependency class provided"); }
public void Init( SchedulerTaskScriptDependencies dependencies, ITaskSettings settings, ScriptFlow flow, ScriptUtility utils ) { this.x = utils; this.Settings = settings; this.Flow = flow; this.Dependencies = dependencies; if (dependencies != null && dependencies.GetType() != DependencyClassType) { throw new InvalidOperationException("Wrong dependency class provided"); } }
protected void ValidateDependencies(SchedulerTaskScriptDependencies result) { if (result!=null && result.RequiredSettings != null) { foreach (string requiredSetting in result.RequiredSettings) { //TODO: match required seeting type if (!Settings.Has(requiredSetting)) throw new Exception("Required setting '" + requiredSetting + "' is missing."); } } }