internal SignerResponse(directsignerresponse signerResponse)
        {
            switch (signerResponse.ItemElementName)
            {
            case ItemChoiceType1.personalidentificationnumber:
                Identifier = new PersonalIdentificationNumber(signerResponse.Item);
                break;

            case ItemChoiceType1.signeridentifier:
                Identifier = new CustomIdentifier(signerResponse.Item);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            RedirectUrl = new Uri(signerResponse.redirecturl);
            SignerUrl   = new Uri(signerResponse.href);
        }
 public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
 {
     return(CustomIdentifier.Parse(
                (string)bindingContext.ValueProvider.GetValue(bindingContext.ModelName).RawValue
                ));
 }