public void PersistCredentials(JenkinsCredentials Credentials) { XmlSerializer serializer = new XmlSerializer(typeof(JenkinsCredentials)); TextWriter writer = new StreamWriter(CredentialsFileName); serializer.Serialize(writer, Credentials); writer.Close(); }
public JenkinsCredentials ReadCredentials() { XmlSerializer serializer = new XmlSerializer(typeof(JenkinsCredentials)); FileStream fs = new FileStream(CredentialsFileName, FileMode.Open); JenkinsCredentials creds = (JenkinsCredentials)serializer.Deserialize(fs); fs.Close(); return(creds); }
public Sentinel(int InspectFrequencyMS, JenkinsCredentials Credentials, ISentinelEvents EventHandler) { this.inspectFrequency = InspectFrequencyMS; this.eventHandler = EventHandler; this.client = new JenkinsClient(Credentials, EventHandler); this.jobs = new List <JenkinsJob>(); this.checkTimer = new Timer(InspectFrequencyMS); this.checkTimer.Elapsed += CheckJobs; this.lastIndex = 0; this.windowTopmost = false; this.defaultCloud = "tramboolean"; }
public void SetCredentials(JenkinsCredentials Credentials) { this.client = new JenkinsClient(Credentials, eventHandler); }
public JenkinsClient(JenkinsCredentials Credentials, ISentinelEvents EventHandler) { this.creds = Credentials; this.eventHandler = EventHandler; }