Exemple #1
0
 private static SubscribeDelta CreateDelta(string id, EventSettings settings)
 {
     return(new SubscribeDelta
     {
         ElementId = id,
         Settings = ClientEventSettings.CreateFrom(settings),
         DebounceInterval = settings.DebounceInterval,
         EvalFilter = settings.EvalFilter
     });
 }
Exemple #2
0
        public static ClientEventSettings CreateFrom(EventSettings settings)
        {
            var client = new ClientEventSettings
            {
                Block       = settings.Block,
                EventName   = settings.EventName,
                LongRunning = settings.LongRunning,
                Propagation = settings.Propagation,
                UploadFiles = settings.UploadFiles
            };

            if (settings.BlockOptions == null)
            {
                return(client);
            }
            client.BlockElementId = settings.BlockOptions.BlockedElementId;
            client.BlockHTML      = settings.BlockOptions.ShowHtmlMessage;
            client.BlockShownId   = settings.BlockOptions.ShowElementId;
            return(client);
        }