Esempio n. 1
0
        public float TimeSpent(CommunicationMediums messageType, bool send, byte randomLevelValue)
        {
            switch (messageType)
            {
            case CommunicationMediums.Irc:
                return(send ? Irc.CostToSend(randomLevelValue) : Irc.CostToReceive(randomLevelValue));

            case CommunicationMediums.Email:
                return(send ? Email.CostToSend(randomLevelValue) : Email.CostToReceive(randomLevelValue));

            case CommunicationMediums.Phone:
                return(send ? Phone.CostToSend(randomLevelValue) : Phone.CostToReceive(randomLevelValue));

            case CommunicationMediums.Meeting:
                return(send ? Meeting.CostToSend(randomLevelValue) : Meeting.CostToReceive(randomLevelValue));

            case CommunicationMediums.FaceToFace:
                return(send ? FaceToFace.CostToSend(randomLevelValue) : FaceToFace.CostToReceive(randomLevelValue));

            case CommunicationMediums.ViaAPlatform:
                return(send
                        ? Platform.CostToSend(randomLevelValue)
                        : Platform.CostToReceive(randomLevelValue));

            case CommunicationMediums.System:
                return(0);

            default:
                throw new NotImplementedException();
            }
        }