public void LoadMoveletTemplate(string prefix, string key) { // read the movelet from resource MovilizerMovelet movelet = TemplateHelper.DeserializeMoveletFromResourceCode( prefix, key, MovilizerWebServiceConstants.WS_NAMESPACE); CacheTemplate(key, movelet); }
public void EnqueueMovelet(MovilizerMovelet movelet, string uname, string phone) { // create a movelet set MovilizerMoveletSet moveletSet = new MovilizerMoveletSet(); moveletSet.movelet = new MovilizerMovelet[] { movelet }; // add a participant MovilizerParticipant participant = this.CreateParticipant(uname, phone); moveletSet.participant = new MovilizerParticipant[] { participant }; _outQueue.Enqueue(moveletSet); }
public MoveletTemplate(MovilizerMovelet movelet) { _movelet = SerializeHelper.CloneObject(movelet); // extract questions _questions = new List <QuestionTemplate>(); MovilizerQuestion[] questions = _movelet.question; if (questions != null) { foreach (MovilizerQuestion question in questions) { _questions.Add(new QuestionTemplate(question)); } } }
public MoveletTemplate(MovilizerMovelet movelet) { _movelet = SerializeHelper.CloneObject(movelet); // extract questions _questions = new List<QuestionTemplate>(); MovilizerQuestion[] questions = _movelet.question; if (questions != null) { foreach (MovilizerQuestion question in questions) { _questions.Add(new QuestionTemplate(question)); } } }
public void SendMoveletTo(MoveletTemplate mTemplate, string[] unames, string[] phones) { string debugOutput = Configuration.GetDebugOutputPath(); if (!String.IsNullOrEmpty(debugOutput)) { // backup the movelet as xml mTemplate.SerializeToFile(debugOutput); } MovilizerMovelet movelet = mTemplate.ToMovelet(); _service.EnqueueMoveletDeletion(movelet.moveletKey, movelet.moveletKeyExtension); _service.EnqueueMovelet(movelet, unames[0], phones[0]); for (int i = 1; i < unames.Length; ++i) { _service.EnqueueMoveletAssignment(movelet.moveletKey, movelet.moveletKeyExtension, unames[i], phones[i]); } }
public void EnqueueMovelet(MovilizerMovelet movelet, string uname, string phone) { // create a movelet set MovilizerMoveletSet moveletSet = new MovilizerMoveletSet(); moveletSet.movelet = new MovilizerMovelet[] { movelet }; // add a participant MovilizerParticipant participant = this.CreateParticipant(uname, phone); moveletSet.participant = new MovilizerParticipant[] { participant }; _outQueue.Enqueue(moveletSet); }