Beispiel #1
0
        static void SetProperty(Commands.SetUserPropertyCommand command)
        {
            var service = new Commanding.SimpleTwitterCommandServiceClient();

            if (command.Name == "IsAdmin")
            {
                if (command.Value == true.ToString())
                {
                    service.AddUserToRole(new Commands.AddUserToRoleCommand()
                    {
                        UserID = command.UserID,
                        Role   = "Admin"
                    });
                }
                else
                {
                    service.RemoveUserFromRole(new Commands.RemoveUserFromRoleCommand()
                    {
                        UserID = command.UserID,
                        Role   = "Admin"
                    });
                }
            }

            service.SetUserProperty(command);
        }
Beispiel #2
0
 public void SetUserProperty(Commands.SetUserPropertyCommand command)
 {
     base.Channel.SetUserProperty(command);
 }