コード例 #1
0
ファイル: LoginManager.cs プロジェクト: ByteSempai/Ubiquitous
 /// <summary>
 /// Checks security for the given destination instance.
 /// </summary>
 /// <param name="destination">The destination that should process messages.</param>
 public void CheckSecurity(Destination destination)
 {
     if (destination == null)
         throw new FluorineException(__Res.GetString(__Res.Invalid_Destination, "null"));
     if (destination.DestinationDefinition != null)
     {
         string[] roles = destination.DestinationDefinition.GetRoles();
         if (roles != null)
         {
             bool authorized = DoAuthorization(roles);
             if (!authorized)
                 throw new UnauthorizedAccessException(__Res.GetString(__Res.Security_AccessNotAllowed));
         }
     }
 }
コード例 #2
0
		internal void RegisterDestination(Destination destination, IService service)
		{
			_destinationServiceMap[destination.Id] = service.id;
            _destinations[destination.Id] = destination;
		}
コード例 #3
0
 internal void SetDestination(Destination value)
 {
     _destination = value;
 }