Ejemplo n.º 1
0
        public override Task <RuleAck> PushRule(Rule request, ServerCallContext context)
        {
            _routingRules.AddRule(request.Name, request);

            _configExporter.Export(_routingRules);

            return(Task.FromResult(new RuleAck
            {
                Accepted = true
            }));
        }
Ejemplo n.º 2
0
 public void Export()
 {
     if (SelectedConfiguration == null)
     {
         Status = "Please select a configuration to export.";
     }
     else
     {
         string exportPath = ChooseExportPath();
         if (!string.IsNullOrEmpty(exportPath))
         {
             ConfigExporter exporter = new ConfigExporter(false, exportPath);
             string         output   = exporter.Export(SelectedConfiguration.SessionGroupUniqueId);
             Status = string.Format("The configuration has been exported to file '{0}'.", output);
         }
         else
         {
             ClearStatus();
         }
     }
 }