예제 #1
0
        public ConfigurationServiceResponse PublishNotificationInfo(string groupName = null)
        {
            IDictionary <string, object> parameters = null;
            var systemUserConnection = UserConnection.AppConnection.SystemUserConnection;
            var response             = new ConfigurationServiceResponse();

            if (!string.IsNullOrEmpty(groupName))
            {
                parameters = new Dictionary <string, object>();
                parameters.Add("type", "byGroup");
                parameters.Add("typeParameter", groupName);
            }
            try {
                NotificationInfoRunner runner = ClassFactory.ForceGet <NotificationInfoRunner>(
                    typeof(NotificationInfoRunner).AssemblyQualifiedName,
                    new ConstructorArgument("userConnection", systemUserConnection),
                    new ConstructorArgument("parameters", parameters));
                runner.Run();
            }
            catch (Exception ex) {
                response.SetErrorInfo(ex);
            }

            return(response);
        }
예제 #2
0
 /// <summary>
 /// Executes job.
 /// </summary>
 /// <param name="userConnection">User connection.</param>
 /// <param name="parameters">Parameters for instances class.</param>
 public void Execute(UserConnection userConnection, IDictionary <string, object> parameters)
 {
     if (IsFeatureEnabled(userConnection) == true)
     {
         NotificationInfoRunner runner = ClassFactory.ForceGet <NotificationInfoRunner>(
             typeof(NotificationInfoRunner).AssemblyQualifiedName,
             new ConstructorArgument("userConnection", userConnection),
             new ConstructorArgument("parameters", parameters));
         runner.Run();
     }
 }