public frmUnPlanned(ISchedulingCommunication schedulingCommunication) { InitializeComponent(); _schedulingCommunication = schedulingCommunication; frmUnPlanned.BindingData = new UnPlannedBindingData(_schedulingCommunication.GetServicesConfigurations()); this.DataContext = frmUnPlanned.BindingData; }
private void Connect(string endPointConfigurationName) { _callBack = new Callback(); _channel = new DuplexChannelFactory <ISchedulingCommunication>(_callBack, endPointConfigurationName); _schedulingCommunicationChannel = _channel.CreateChannel(); _schedulingCommunicationChannel.Subscribe(); _callBack.NewScheduleCreatedEvent += new EventHandler(_callBack_NewScheduleCreatedEvent); _callBack.NewInstanceEvent += new EventHandler(_callBack_NewInstanceEvent); BindingData.Connected = true; }
public Legacy.IsAlive GetStatus(string accountid, string guid) { Guid unplannedGuid = Guid.Parse(guid); Legacy.IsAlive status; ChannelFactory <ISchedulingCommunication> channel = new ChannelFactory <ISchedulingCommunication>("SeperiaSchedulerCommunication"); ISchedulingCommunication schedulingCommunication = channel.CreateChannel(); status = schedulingCommunication.IsAlive(unplannedGuid); return(status); }
public Guid RunService(string accountid, string servicename, string options) { Guid guid; ChannelFactory <ISchedulingCommunication> channel = new ChannelFactory <ISchedulingCommunication>("SeperiaSchedulerCommunication"); ISchedulingCommunication schedulingCommunication = channel.CreateChannel(); Dictionary <string, string> settings = new Dictionary <string, string>(); string[] settingsArray = options.Split(':'); foreach (var setting in settingsArray) { string[] keyValue = setting.Split('='); settings.Add(keyValue[0], keyValue[1]); } guid = schedulingCommunication.AddUnplanedService(int.Parse(accountid), servicename, settings, DateTime.Now); return(guid); }