private IProfileInfo CheckProfile()
        {
            switch (_profileType)
            {
            case ProfileType.Administrator:
                return(AdministratorProfile.CreateProfile());

            case ProfileType.Consultant:
                return(ConsultantProfile.CreateProfile());

            case ProfileType.ExternalCustomer:
                return(ExternalCustomerProfile.CreateProfile());

            case ProfileType.InternalCustomer:
                return(InternalCustomerProfile.CreateProfile());

            case ProfileType.Producer:
                return(ProducerProfile.CreateProfile());

            case ProfileType.Carrier:
                return(CarrierProfile.CreateProfile());

            default:
                return(AnonimousProfile.CreateProfile());
            }
        }
Ejemplo n.º 2
0
        // private methods
        private void CheckProfile()
        {
            switch (profileInfo)
            {
            case ProfileInfoEnum.Administrator:
                Profile = AdministratorProfile.CreateProfile();
                break;

            case ProfileInfoEnum.Consultant:
                Profile = ConsultantProfile.CreateProfile();
                break;

            case ProfileInfoEnum.ExternalCustomer:
                Profile = ExternalCustomerProfile.CreateProfile();
                break;

            case ProfileInfoEnum.InternalCustomer:
                Profile = InternalCustomerProfile.CreateProfile();
                break;

            case ProfileInfoEnum.Producer:
                Profile = ProducerProfile.CreateProfile();
                break;

            case ProfileInfoEnum.Carrier:
                Profile = CarrierProfile.CreateProfile();
                break;
            }
        }