コード例 #1
0
 public static Func <IList <SignatureFileRequest>, IResultAppCollection <ISignatureFileApp> > GetSignaturesSync(IResultCollection <ISignatureFile> signatureFile,
                                                                                                                ISignatureConverter signatureConverter, string signatureFolder) =>
 signaturesFileRequest =>
 signaturesFileRequest.
 Select(signatureRequest => signatureRequest.PersonId).
 Map(ids => signatureFile.ResultValueOk(signatures => signatures.Where(signature => ids.Contains(signature.PersonId)))).
 ResultValueOk(signatureConverter.FromSignaturesFile).
 ToResultValueApplication().
 Map(signatures => GetSignaturesFileApp(signatures, signaturesFileRequest, signatureConverter, signatureFolder));
コード例 #2
0
 /// <summary>
 /// Функция поиска по идентификатору
 /// </summary>
 public static Func <TestEnum, IResultValue <ITestDomain> > GetByIdOkFunc(IResultCollection <ITestDomain> testDomains) =>
 id => testDomains.ResultValueOk(tests => SearchInDomains.FirstDomain(tests, id));
コード例 #3
0
 /// <summary>
 /// Функция проверки значения
 /// </summary>
 public static Func <ITestDomain, IResultError> ValidateValueOkFunc(IResultCollection <ITestDomain> testDomains) =>
 domain => testDomains.ResultValueOk(tests => SearchInDomains.FirstDomain(tests, domain.Id).Id);
コード例 #4
0
 /// <summary>
 /// Функция записи значения
 /// </summary>
 public static Func <ITestDomain, IResultValue <TestEnum> > PostValueOkFunc(IResultCollection <ITestDomain> testDomains) =>
 domain => testDomains.ResultValueOk(tests => SearchInDomains.FirstDomain(tests, domain.Id).Id);