Exemplo n.º 1
0
 public UserPermission(MicroServices.Area area, string[] roles)
 {
     Area               = area;
     SubArea            = MicroServices.Area.None;
     Roles              = new List <string>(roles);
     SubAreaPermissions = new Dictionary <string, UserPermission>();
 }
Exemplo n.º 2
0
 public Request(MicroServices.RequestType requestType, MicroServices.Area area, IActorRef requestor = null, object originalRequest = null)
 {
     Area            = area;
     RequestType     = requestType;
     Requestor       = requestor;
     OriginalRequest = originalRequest;
 }
Exemplo n.º 3
0
 public Command(string id, MicroServices.CommandType commandType, string fieldName, object data, MicroServices.Area area, string user, string connectionId)
 {
     Id           = id;
     Area         = area;
     CommandType  = commandType;
     FieldName    = fieldName;
     Data         = data;
     User         = user;
     ConnectionId = connectionId;
 }
 public CommandEventMessage(string id, string name, bool isSuccesful, string actorType, MicroServices.CommandType commandType, MicroServices.Area area, string message, object data, string user, string connectionId)
 {
     Id           = id;
     Name         = name;
     Success      = isSuccesful;
     ActorType    = actorType;
     CommandType  = commandType;
     Area         = area;
     Message      = message;
     Data         = data;
     User         = user;
     ConnectionId = connectionId;
 }
Exemplo n.º 5
0
        /// <summary>
        /// Adds connection to internal dictionary and also ensures the connection joins the appropriate SignalR group.
        /// </summary>
        /// <param name="a"></param>
        /// <param name="area"></param>
        private void TrackConnection(HTTPSourcedAction a, MicroServices.Area area)
        {
            _ConnectionAreas = _ConnectionAreas ?? new Dictionary <string, List <MicroServices.Area> >();

            // Add the connection to the dict if not there
            if (!_ConnectionAreas.ContainsKey(a.ConnectionId))
            {
                _ConnectionAreas.Add(a.ConnectionId, new List <MicroServices.Area>());
            }
            // Add the area and add the user to the signal r group if not there
            if (!_ConnectionAreas[a.ConnectionId].Contains(MicroServices.Area.Client))
            {
                _logger.Debug("Adding user '{0}' to group '{1}'", a.User, area.ToString());
                _ConnectionAreas[a.ConnectionId].Add(area);
                _HTTPClientInterface.JoinGroup(area.ToString(), a.ConnectionId);
            }
        }
 public SubscribeRequest(IActorRef subscriber, MicroServices.Area area)
     : base(MicroServices.RequestType.Subscribe, area, subscriber)
 {
 }
 public UnSubscribeForCommandEvents(IActorRef subscriber, MicroServices.Area area)
     : base(subscriber, area)
 {
 }
 public UpdateCommandEventMessage(string id, string name, string actorType, MicroServices.Area area, string message, object data, string user, string connectionId)
     : base(id, name, true, actorType, MicroServices.CommandType.Update, area, message, data, user, connectionId)
 {
 }
 public FailedUnDeleteCommandEventMessage(string id, string name, string actorType, MicroServices.Area area, string message, object data, string user, string connectionId) :
     base(id, name, false, actorType, MicroServices.CommandType.Undelete, area, message, data, user, connectionId)
 {
 }
 public SupervisorInfo(string actorType, MicroServices.Area area, IActorRef reference)
 {
     ActorType = actorType;
     Area      = area;
     SupervisorActorReference = reference;
 }
 public UnSubscribeForSupervisorEventsRequest(IActorRef subscriber, MicroServices.Area area)
     : base(subscriber, area)
 {
 }
 public RegisterSupervisor(IActorRef requestor, string actorType, MicroServices.Area registrationArea) : base(requestor, MicroServices.RequestType.Register, null)
 {
     ActorType         = actorType;
     ResgistrationArea = registrationArea;
 }