Ejemplo n.º 1
0
        static internal SignTask Map(SignTaskDTO signTaskDTO)
        {
            FixedList <SignRequest> signRequests = Map(signTaskDTO.signRequests);
            SignCredentials         credentials  = Map(signTaskDTO.credentials);

            return(new SignTask(signTaskDTO.eventType, signRequests, credentials));
        }
Ejemplo n.º 2
0
        static private FixedList <SignEventDTO> ExecuteSignTask(SignTaskDTO signTaskDTO,
                                                                SignEventType eventType)
        {
            EnsureValidSignTaskDTO(signTaskDTO);

            signTaskDTO.eventType = eventType;

            SignTask signTask = ESignMapper.Map(signTaskDTO);

            var signTaskProcessor = new SignTaskProcessor();

            FixedList <SignEvent> signEvents = signTaskProcessor.Execute(signTask);

            return(ESignMapper.Map(signEvents));
        }
Ejemplo n.º 3
0
        static public void EnsureValidSignTaskDTO(SignTaskDTO signTaskDTO)
        {
            Assertion.AssertObject(signTaskDTO, "signTaskDTO");

            Assertion.AssertObject(signTaskDTO.credentials,
                                   "signTaskDTO.credentials");

            Assertion.AssertObject(signTaskDTO.credentials.password,
                                   "signTaskDTO.credentials.password");

            Assertion.AssertObject(signTaskDTO.signRequests,
                                   "signTaskDTO.signRequests");

            Assertion.Assert(signTaskDTO.signRequests.Count > 0,
                             "signTaskDTO.signRequests must be a non empty array");
        }
Ejemplo n.º 4
0
 static public FixedList <SignEventDTO> UnrefuseSign(SignTaskDTO eSignTask)
 {
     return(ExecuteSignTask(eSignTask, SignEventType.Unrefused));
 }
Ejemplo n.º 5
0
 static public FixedList <SignEventDTO> Sign(SignTaskDTO signTaskDTO)
 {
     return(ExecuteSignTask(signTaskDTO, SignEventType.Signed));
 }