コード例 #1
0
 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");
 }
コード例 #2
0
 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");
     }
 }
コード例 #3
0
 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.");
         }
     }
 }