public override void Bind(IEditorService service) { service.RegisterCustomNotifier(this); try { _fsvc = (IFusionService)service.GetService((int)ServiceType.Fusion); if (service.CurrentConnection.ProviderName.ToUpper() == "MAESTRO.HTTP") { _baseUrl = service.GetCustomProperty("BaseUrl").ToString(); //NOXLATE if (!_baseUrl.EndsWith("/")) //NOXLATE { _baseUrl += "/"; //NOXLATE } } } catch { throw new NotSupportedException(Strings.IncompatibleConnection); } _edsvc = service; _edsvc.RegisterCustomNotifier(this); _flexLayout = (IApplicationDefinition)service.GetEditedResource(); foreach (var grp in _flexLayout.MapSet.MapGroups) { AddMap(grp); } }
public override void Bind(IEditorService service) { _edsvc = service; _edsvc.RegisterCustomNotifier(this); try { _fsvc = (IFusionService)_edsvc.GetService((int)ServiceType.Fusion); _baseUrl = service.GetCustomProperty("BaseUrl").ToString(); //NOXLATE if (!_baseUrl.EndsWith("/")) //NOXLATE _baseUrl += "/"; //NOXLATE } catch { throw new NotSupportedException(Strings.IncompatibleConnection); } _edsvc.Saved += OnSaved; _flexLayout = (IApplicationDefinition)service.GetEditedResource(); TextBoxBinder.BindText(txtTemplateUrl, _flexLayout, "TemplateUrl"); //NOXLATE TextBoxBinder.BindText(txtTitle, _flexLayout, "Title"); //NOXLATE var templates = _fsvc.GetApplicationTemplates(); InitializeTemplateList(templates); GeneratePreviewUrl(); }
public override void Bind(IEditorService service) { _edsvc = service; _edsvc.RegisterCustomNotifier(this); try { _fsvc = (IFusionService)_edsvc.GetService((int)ServiceType.Fusion); if (service.CurrentConnection.ProviderName.ToUpper() == "MAESTRO.HTTP") { _baseUrl = service.GetCustomProperty("BaseUrl").ToString(); //NOXLATE if (!_baseUrl.EndsWith("/")) //NOXLATE { _baseUrl += "/"; //NOXLATE } } } catch { throw new NotSupportedException(Strings.IncompatibleConnection); } _edsvc.Saved += OnSaved; _flexLayout = (IApplicationDefinition)service.GetEditedResource(); TextBoxBinder.BindText(txtTemplateUrl, _flexLayout, "TemplateUrl"); //NOXLATE TextBoxBinder.BindText(txtTitle, _flexLayout, "Title"); //NOXLATE var templates = _fsvc.GetApplicationTemplates(); InitializeTemplateList(templates); GeneratePreviewUrl(); }
public override void Bind(IEditorService service) { try { _edsvc = service; _fsvc = (IFusionService)_edsvc.GetService((int)ServiceType.Fusion); _context = new FlexibleLayoutEditorContext(_fsvc); if (service.CurrentConnection.ProviderName.ToUpper() == "MAESTRO.HTTP") { _baseUrl = service.GetCustomProperty("BaseUrl").ToString(); //NOXLATE if (!_baseUrl.EndsWith("/")) //NOXLATE { _baseUrl += "/"; //NOXLATE } } } catch { throw new NotSupportedException(Strings.IncompatibleConnection); } service.RegisterCustomNotifier(this); _flexLayout = (IApplicationDefinition)service.GetEditedResource(); InitWidgetSet(); }
/// <summary> /// Constructor /// </summary> /// <param name="service"></param> public FlexibleLayoutEditorContext(IFusionService service) { _service = service; _widgetSet = _service.GetApplicationWidgets(); _templateSet = _service.GetApplicationTemplates(); _containerSet = _service.GetApplicationContainers(); }
public WidgetReferenceCtrl(IWidgetItem item, IEditorService edsvc) : this() { _widgetRef = item; _flexLayout = (IApplicationDefinition)edsvc.GetEditedResource(); _fsvc = (IFusionService)edsvc.GetService((int)ServiceType.Fusion); _context = new FlexibleLayoutEditorContext(_fsvc); cmbWidgetRefs.DataSource = _context.GetDockableWidgetNames(_flexLayout); cmbWidgetRefs.SelectedItem = item.Widget; _init = false; }
/// <summary> /// Initializes a new <see cref="DeployService"/>. /// </summary> /// <param name="syncService">Service used for synchronizing package versions.</param> /// <param name="fusionService">Service used for fusing packages.</param> /// <param name="scheduleService">Service used for orchestrating fusion packages.</param> /// <param name="announcementFactory">Factory that creates <see cref="IDeployAnnouncement"/> instances.</param> /// <param name="packageVersionValidator">The validator that is used to validate announced package version(s).</param> public DeployService( ISyncService syncService, IFusionService fusionService, IScheduleService scheduleService, IDeployAnnouncementFactory announcementFactory, IPackageVersionValidator packageVersionValidator) { this.syncService = syncService; this.fusionService = fusionService; this.scheduleService = scheduleService; this.announcementFactory = announcementFactory; this.packageVersionValidator = packageVersionValidator; }
/// <summary> /// Initializes a new <see cref="ZappServer"/>. /// </summary> /// <param name="logService">Service used for logging.</param> /// <param name="apiService">Service used for outside communcation.</param> /// <param name="syncService">Service used for package-version synchronization.</param> /// <param name="fusionService">Service used for extraction fusions.</param> /// <param name="scheduleService">Service used for scheduling fusions.</param> public ZappServer( ILog logService, IRestService apiService, ISyncService syncService, IFusionService fusionService, IScheduleService scheduleService) { this.logService = logService; this.apiService = apiService; this.syncService = syncService; this.fusionService = fusionService; this.scheduleService = scheduleService; }
/// <summary> /// Initializes a new <see cref="DeployAnnouncement"/> with the new <paramref name="packageVersions"/> that needs to be deployed. /// </summary> /// <param name="configStore">Store used to get information from the configuration.</param> /// <param name="fusionService">Service used to get info for package fusions.</param> /// <param name="fusionIds">Ids of the fusions that needs to be deployed. (empty if <paramref name="packageVersions"/> is specified).</param> /// <param name="packageVersions">Versions of the packages that needs to be deployed. (empty if <paramref name="fusionIds"/> is specified).</param> public DeployAnnouncement( IConfigStore configStore, IFusionService fusionService, IEnumerable <string> fusionIds, IEnumerable <PackageVersion> packageVersions) { EnsureArg.IsNotNull(fusionIds, nameof(fusionIds)); EnsureArg.IsNotNull(packageVersions, nameof(packageVersions)); this.configStore = configStore; this.fusionService = fusionService; var fusionIdsStale = fusionIds.StaleReadOnly(); this.packageVersions = fusionIdsStale.Any() ? new PackageVersion[0] : packageVersions.StaleReadOnly(); affectedFusionIds = fusionIdsStale.Any() ? fusionIdsStale : GetAffectedFusionIds(this.packageVersions).StaleReadOnly(); }
/// <summary> /// Initializes a new <see cref="ScheduleService"/>. /// </summary> /// <param name="logService">Service used for logging.</param> /// <param name="configStore">Store used for loading configuration.</param> /// <param name="fusionService">Service used for resolving fusion extractions.</param> /// <param name="fusionProcessFactory">Factory used for creating <see cref="IFusionProcess"/> instances.</param> /// <param name="announcementFactory">Factory that creates <see cref="IDeployAnnouncement"/> instances.</param> /// <param name="drainers">Collection of drainers that needs to determine if a <see cref="IFusionProcess"/> is ready for teardown.</param> /// <param name="interceptors">Collection of interceptors thats needs to be fired on certain events.</param> public ScheduleService( ILog logService, IConfigStore configStore, IFusionService fusionService, IFusionProcessFactory fusionProcessFactory, IDeployAnnouncementFactory announcementFactory, IEnumerable <IFusionProcessDrainer> drainers, IEnumerable <IFusionProcessInterceptor> interceptors) { this.logService = logService; this.configStore = configStore; this.fusionService = fusionService; this.fusionProcessFactory = fusionProcessFactory; this.announcementFactory = announcementFactory; this.drainers = drainers.StaleReadOnly(); this.interceptors = interceptors.StaleReadOnly(); syncLock = new SemaphoreSlim(nrOfSimultaneousOperations); processes = new SortedDictionary <string, IFusionProcess>( StringComparer.OrdinalIgnoreCase); }
public override void Bind(IEditorService service) { try { _edsvc = service; _fsvc = (IFusionService)_edsvc.GetService((int)ServiceType.Fusion); _context = new FlexibleLayoutEditorContext(_fsvc); _baseUrl = service.GetCustomProperty("BaseUrl").ToString(); //NOXLATE if (!_baseUrl.EndsWith("/")) //NOXLATE _baseUrl += "/"; //NOXLATE } catch { throw new NotSupportedException(Strings.IncompatibleConnection); } service.RegisterCustomNotifier(this); _flexLayout = (IApplicationDefinition)service.GetEditedResource(); InitWidgetSet(); }
public FusionSession(IFusionService fusionService, ILogStore store) { FusionService = fusionService ?? throw new ArgumentNullException(nameof(fusionService)); Store = store ?? throw new ArgumentNullException(nameof(store)); }
public FusionSession(IFusionService fusionService) : this(fusionService, new TemporaryLogStore()) { }
public override void Bind(IEditorService service) { service.RegisterCustomNotifier(this); try { _fsvc = (IFusionService)service.GetService((int)ServiceType.Fusion); _baseUrl = service.GetCustomProperty("BaseUrl").ToString(); //NOXLATE if (!_baseUrl.EndsWith("/")) //NOXLATE _baseUrl += "/"; //NOXLATE } catch { throw new NotSupportedException(Strings.IncompatibleConnection); } _edsvc = service; _edsvc.RegisterCustomNotifier(this); _flexLayout = (IApplicationDefinition)service.GetEditedResource(); foreach (var grp in _flexLayout.MapSet.MapGroups) { AddMap(grp); } }