public void Complex() { var context = TestExecuter.GetContext(); var builder = SequenceBuilder.Fluent .ReadFrom(TestData.Person(context)) .ExpandFromLookup(new ExpandFromLookupMutator(context) { LookupBuilder = new RowLookupBuilder() { Process = TestData.Country(context), KeyGenerator = row => row.GenerateKey("id"), }, MatchSelector = (row, lookup) => { return(lookup.GetSingleRowByKey(row.GenerateKey("countryId"))); }, NoMatchAction = new NoMatchAction(MatchMode.Custom) { CustomAction = row => { row["countryAbbrev"] = !row.HasValue("countryId") ? "country was null" : "no match found"; } }, MatchCustomAction = (row, match) => row["countryAbbrevFound"] = true, Columns = new() {
public void NoMatchCustom() { var context = TestExecuter.GetContext(); var executedBatchCount = 0; var builder = ProcessBuilder.Fluent .ReadFrom(TestData.Person(context)) .JoinBatched(new BatchedJoinMutator(context) { BatchSize = 4, LookupBuilder = new FilteredRowLookupBuilder() { ProcessCreator = filterRows => { executedBatchCount++; return(TestData.PersonEyeColor(context)); }, KeyGenerator = row => row.GenerateKey("personId"), }, RowKeyGenerator = row => row.GenerateKey("id"), NoMatchAction = new NoMatchAction(MatchMode.Custom) { CustomAction = row => row["eyeColor"] = "not found", }, Columns = new() {
public void DummyForDevelopment3() { var context = TestExecuter.GetContext(); var builder = ProcessBuilder.Fluent .ReadFrom(TestData.Person(context)) .Join(new JoinMutator(context) { LookupBuilder = new RowLookupBuilder() { Process = TestData.PersonEyeColor(context), KeyGenerator = row => row.GenerateKey("personId"), }, RowKeyGenerator = row => row.GenerateKey("id"), NoMatchAction = new NoMatchAction(MatchMode.Throw), Columns = new(), });
public void NoMatchCustom() { var context = TestExecuter.GetContext(); var builder = ProcessBuilder.Fluent .ReadFrom(TestData.Person(context)) .Join(new JoinMutator(context) { LookupBuilder = new RowLookupBuilder() { Process = TestData.PersonEyeColor(context), KeyGenerator = row => row.GenerateKey("personId"), }, RowKeyGenerator = row => row.GenerateKey("id"), NoMatchAction = new NoMatchAction(MatchMode.Custom) { CustomAction = row => row["eyeColor"] = "not found", }, Columns = new() {
private void Initalize() { UrlMappingConfig config = UrlMappingConfig.Instance; _provider = ServiceLocator.Instance.Resolve <IUrlMappingProvider>(); _noMatchAction = config.NoMatchAction; _noMatchRedirectPage = config.NoMatchRedirectUrl; _automaticallyUpdateFormAction = config.AutoUpdateFormAction; _qsBehavior = config.IncomingQueryStringBehavior; _processingEvent = config.UrlProcessingEvent; if (_provider != null) { _provider.Initialize(config); } // save to config config.Provider = _provider; }
private void Initalize() { UrlMappingConfig config = UrlMappingConfig.Instance; _provider = ServiceLocator.Instance.Resolve<IUrlMappingProvider>(); _noMatchAction = config.NoMatchAction; _noMatchRedirectPage = config.NoMatchRedirectUrl; _automaticallyUpdateFormAction = config.AutoUpdateFormAction; _qsBehavior = config.IncomingQueryStringBehavior; _processingEvent = config.UrlProcessingEvent; if (_provider != null) { _provider.Initialize(config); } // save to config config.Provider = _provider; }