Esempio n. 1
0
 /// <summary>
 /// Convert back to service model
 /// </summary>
 /// <returns></returns>
 public ServerRegistrationRequestModel ToServiceModel()
 {
     return(new ServerRegistrationRequestModel {
         DiscoveryUrl = DiscoveryUrl,
         RegistrationId = RegistrationId,
         Callback = Callback?.ToServiceModel(),
         ActivationFilter = ActivationFilter?.ToServiceModel()
     });
 }
 /// <summary>
 /// ctor
 /// </summary>
 public PopupForm()
 {
     this.ControlBox      = false;
     this.FormBorderStyle = FormBorderStyle.None;
     this.StartPosition   = FormStartPosition.Manual;
     this.ShowInTaskbar   = false;
     //filters
     _mousefilter      = new MouseFilter(this);
     _activationfilter = new ActivationFilter(this);
 }
 /// <summary>
 /// ctor
 /// </summary>
 public PopupForm()
 {
     this.ControlBox = false;
     this.FormBorderStyle = FormBorderStyle.None;
     this.StartPosition = FormStartPosition.Manual;
     this.ShowInTaskbar = false;
     //filters
     _mousefilter=new MouseFilter(this);
     _activationfilter=new ActivationFilter(this);
 }
 /// <summary>
 /// Convert back to service model
 /// </summary>
 /// <returns></returns>
 public DiscoveryConfigModel ToServiceModel()
 {
     return(new DiscoveryConfigModel {
         AddressRangesToScan = AddressRangesToScan,
         NetworkProbeTimeout = NetworkProbeTimeout,
         MaxNetworkProbes = MaxNetworkProbes,
         PortRangesToScan = PortRangesToScan,
         PortProbeTimeout = PortProbeTimeout,
         MaxPortProbes = MaxPortProbes,
         MinPortProbesPercent = MinPortProbesPercent,
         IdleTimeBetweenScans = IdleTimeBetweenScans,
         ActivationFilter = ActivationFilter?.ToServiceModel(),
         Locales = Locales,
         DiscoveryUrls = DiscoveryUrls,
     });
 }
 /// <summary>
 /// Convert back to service model
 /// </summary>
 /// <returns></returns>
 public DiscoveryConfigModel ToServiceModel()
 {
     return(new DiscoveryConfigModel {
         AddressRangesToScan = AddressRangesToScan,
         NetworkProbeTimeout = NetworkProbeTimeout,
         MaxNetworkProbes = MaxNetworkProbes,
         PortRangesToScan = PortRangesToScan,
         PortProbeTimeout = PortProbeTimeout,
         MaxPortProbes = MaxPortProbes,
         MinPortProbesPercent = MinPortProbesPercent,
         IdleTimeBetweenScans = IdleTimeBetweenScans,
         ActivationFilter = ActivationFilter?.ToServiceModel(),
         Callbacks = Callbacks?
                     .Where(c => c != null)
                     .Select(c => c.ToServiceModel())
                     .ToList(),
         Locales = Locales,
         DiscoveryUrls = DiscoveryUrls,
     });
 }
Esempio n. 6
0
 /// <summary>
 /// Convert back to service model
 /// </summary>
 /// <returns></returns>
 public DiscoveryConfigModel ToServiceModel()
 {
     return(new DiscoveryConfigModel {
         AddressRangesToScan = AddressRangesToScan,
         NetworkProbeTimeout = NetworkProbeTimeoutMs == null ?
                               (TimeSpan?)null : TimeSpan.FromMilliseconds((double)NetworkProbeTimeoutMs),
         MaxNetworkProbes = MaxNetworkProbes,
         PortRangesToScan = PortRangesToScan,
         PortProbeTimeout = PortProbeTimeoutMs == null ?
                            (TimeSpan?)null : TimeSpan.FromMilliseconds((double)PortProbeTimeoutMs),
         MaxPortProbes = MaxPortProbes,
         MinPortProbesPercent = MinPortProbesPercent,
         IdleTimeBetweenScans = IdleTimeBetweenScansSec == null ?
                                (TimeSpan?)null: TimeSpan.FromSeconds((double)IdleTimeBetweenScansSec),
         ActivationFilter = ActivationFilter?.ToServiceModel(),
         Callbacks = Callbacks?
                     .Where(c => c != null)
                     .Select(c => c.ToServiceModel())
                     .ToList(),
         Locales = Locales,
         DiscoveryUrls = DiscoveryUrls
     });
 }