public IViewProcessorUnmapper UnmapMatcher(ITypeMatcher matcher) { IViewProcessorMapper mapper; if(!_mappers.TryGetValue(matcher.CreateTypeFilter().Descriptor, out mapper)) return NULL_UNMAPPER; return mapper as IViewProcessorUnmapper; }
public PluginRepository(IReadOnlyList <IBuildPlugin> build, IReadOnlyList <ISourceControlPlugin> sourceControl, IReadOnlyList <INotificationProcessor> notificationProcessors, ITypeMatcher typeMatcher) { Build = build; SourceControl = sourceControl; NotificationProcessors = notificationProcessors; _typeMatcher = typeMatcher; }
public void ExcludeAutoRegistration(Type resolverType, ITypeMatcher match) { if (!ResolverExclusions.TryGetValue(resolverType, out List <ITypeMatcher> exclusions)) { exclusions = new List <ITypeMatcher>(); ResolverExclusions.Add(resolverType, exclusions); } exclusions.Add(match); }
/// <summary> /// Prevents the <paramref name="serviceBindingGeneratorType"/>> from being executed if the to be resolved type matches with <paramref name="match"/> /// </summary> /// <param name="serviceBindingGeneratorType"></param> /// <param name="match"></param> public void ExcludeAutoRegistration(Type serviceBindingGeneratorType, ITypeMatcher match) { if (!ResolverExclusions.TryGetValue(serviceBindingGeneratorType, out List <ITypeMatcher> exclusions)) { exclusions = new List <ITypeMatcher>(); ResolverExclusions.Add(serviceBindingGeneratorType, exclusions); } exclusions.Add(match); }
public IViewProcessorUnmapper UnmapMatcher(ITypeMatcher matcher) { IViewProcessorMapper mapper; if (!_mappers.TryGetValue(matcher.CreateTypeFilter().Descriptor, out mapper)) { return(NULL_UNMAPPER); } return(mapper as IViewProcessorUnmapper); }
/*============================================================================*/ /* Public Functions */ /*============================================================================*/ public IMediatorMapper MapMatcher(ITypeMatcher matcher) { string descriptor = matcher.CreateTypeFilter().Descriptor; if (!_mappers.ContainsKey(descriptor)) { _mappers [descriptor] = CreateMapper(matcher); } return(_mappers[descriptor]); }
/*============================================================================*/ /* Public Functions */ /*============================================================================*/ public IViewProcessorMapper MapMatcher(ITypeMatcher matcher) { string descriptor = matcher.CreateTypeFilter().Descriptor; IViewProcessorMapper mapper; if (_mappers.ContainsKey (descriptor)) { mapper = _mappers [descriptor]; } else { mapper = _mappers[descriptor] = CreateMapper(matcher); } return mapper; }
/*============================================================================*/ /* Public Functions */ /*============================================================================*/ public IViewProcessorMapper MapMatcher(ITypeMatcher matcher) { string descriptor = matcher.CreateTypeFilter().Descriptor; IViewProcessorMapper mapper; if (_mappers.ContainsKey(descriptor)) { mapper = _mappers [descriptor]; } else { mapper = _mappers[descriptor] = CreateMapper(matcher); } return(mapper); }
public AssemblyTypeFinder WithTypeMatcher(ITypeMatcher typeFilter) { this.typeMatchers.Add(typeFilter); return(this); }
/// <inheritdoc /> public PluginRepository(IReadOnlyList <IBuildPlugin> build, IReadOnlyList <ISourceControlPlugin> sourceControl, ITypeMatcher typeMatcher) { Build = build; SourceControl = sourceControl; _typeMatcher = typeMatcher; }
protected virtual ITypeMatcher[] BuildTypeMatchers(ITypeMatcher[] customMatchers) { var matchers = new List<ITypeMatcher> { }; if (customMatchers != null && customMatchers.Length > 0) { matchers.AddRange(customMatchers); } return matchers.ToArray(); }
/*============================================================================*/ /* Private Functions */ /*============================================================================*/ private IViewProcessorMapper CreateMapper(ITypeMatcher matcher) { return new ViewProcessorMapper(matcher.CreateTypeFilter(), _handler); }
public TypeMatcherCaseHandler(TypeMatcher <T, TResult> typeMatcher, Action <TypeMatcherCaseOfData <T, TResult> > dataRecorder) { _typeMatcher = typeMatcher; _dataRecorder = dataRecorder; }
/*============================================================================*/ /* Private Functions */ /*============================================================================*/ private IViewProcessorMapper CreateMapper(ITypeMatcher matcher) { return(new ViewProcessorMapper(matcher.CreateTypeFilter(), _handler)); }
public IMediatorUnmapper UnmapMatcher(ITypeMatcher matcher) { string descriptor = matcher.CreateTypeFilter().Descriptor; return(_mappers.ContainsKey(descriptor) ? _mappers[descriptor] : NULL_UNMAPPER); }
public void IgnoreResolveError(ITypeMatcher match) { ResolveErrorsExclusions.Add(match); }
public void ExcludeAutoRegistration <TResolverType>(ITypeMatcher match) where TResolverType : IServiceBindingGenerator { ExcludeAutoRegistration(typeof(TResolverType), match); }
/*============================================================================*/ /* Private Functions */ /*============================================================================*/ private MediatorMapper CreateMapper(ITypeMatcher matcher) { return(new MediatorMapper(matcher.CreateTypeFilter(), _viewHandler, _logger)); }