Exemplo n.º 1
0
 private bool CheckThreatLevel(NeighborThreatLevel thisThreat)
 {
     if (m_threatLevel > thisThreat)
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 2
0
 public NeighborHandler(INeighborService service, IAuthenticationService authentication, IConfigSource config) :
     base("POST", "/region")
 {
     m_NeighborService = service;
     m_AuthenticationService = authentication;
     IConfig neighborsConfig = config.Configs["NeighborService"];
     if (neighborsConfig != null)
     {
         m_threatLevel = (NeighborThreatLevel)Enum.Parse(typeof(NeighborThreatLevel), neighborsConfig.GetString("ThreatLevel", "Low"));
     }
 }
Exemplo n.º 3
0
        public NeighborHandler(INeighborService service, IAuthenticationService authentication, IConfigSource config) :
            base("POST", "/region")
        {
            m_NeighborService       = service;
            m_AuthenticationService = authentication;
            IConfig neighborsConfig = config.Configs["NeighborService"];

            if (neighborsConfig != null)
            {
                m_threatLevel = (NeighborThreatLevel)Enum.Parse(typeof(NeighborThreatLevel), neighborsConfig.GetString("ThreatLevel", "Low"));
            }
        }
Exemplo n.º 4
0
 private bool CheckThreatLevel(NeighborThreatLevel thisThreat)
 {
     if (m_threatLevel > thisThreat)
         return false;
     return true;
 }