コード例 #1
0
        public void PersistCredentials(JenkinsCredentials Credentials)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(JenkinsCredentials));
            TextWriter    writer     = new StreamWriter(CredentialsFileName);

            serializer.Serialize(writer, Credentials);
            writer.Close();
        }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: Sentinel.cs プロジェクト: david3355/JenkinsSentinel
 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";
 }
コード例 #4
0
ファイル: Sentinel.cs プロジェクト: david3355/JenkinsSentinel
 public void SetCredentials(JenkinsCredentials Credentials)
 {
     this.client = new JenkinsClient(Credentials, eventHandler);
 }
コード例 #5
0
 public JenkinsClient(JenkinsCredentials Credentials, ISentinelEvents EventHandler)
 {
     this.creds        = Credentials;
     this.eventHandler = EventHandler;
 }