Skip to content
Permalink
Browse files

minor update

  • Loading branch information...
apobekiaris committed Aug 20, 2019
1 parent 57266a6 commit c40aa709a3c2af5b42e5dde85b75b83d6f0adea1
2 go.ps1
@@ -8,7 +8,7 @@ param(
[string]$branch="lab",
[switch]$InstallModules,
[string[]]$taskList=@("Release"),
[string]$XpandPwshVersion = "0.14.0",
[string]$XpandPwshVersion = "0.15.0",
[switch]$Release
)
$ErrorActionPreference = "Stop"
@@ -16,7 +16,7 @@ public static class CloneMemberValueService{
public static IObservable<Unit> Connect(this ApplicationModulesManager modulesManager ,XafApplication application){
if (application != null){
return application.WhenCloneMemberValues()
.Tracer(true)
.Tracer(verbose:true)
.ToUnit();
}
return Observable.Empty<Unit>();
@@ -43,9 +43,9 @@ public static class ModelExtendingService{
private static IObservable<(Type targetIntefaceType, Type extenderInterface)> AddExtenders(ModelInterfaceExtenders extenders){
var modelExtenders = ModelMapperConfigurations.Distinct(_ => _.TypeToMap).ToObservable();
var mappedContainers = TypeMappingService.Connect()
.SelectMany(unit => modelExtenders
.Select(_ => _.MapToModel()).Switch()
.ModelInterfaces()
.SelectMany(unit => modelExtenders.Tracer("ModelExtenders")
.Select(_ => _.MapToModel().Tracer("MapToModel")).Switch()
.ModelInterfaces().Tracer("ModelInterface")
.Where(type => typeof(IModelNode).IsAssignableFrom(type)))
.SelectMany(type => type.ModelMapperContainerTypes())
.Distinct().Replay().RefCount();
@@ -31,13 +31,16 @@ public static class CommonExtensions{
.SkipLast(1)
.Merge(xs))));
}
public static IObservable<TSource> Tracer<TSource>(this IObservable<TSource> source,bool verbose=false){
public static IObservable<TSource> Tracer<TSource>(this IObservable<TSource> source,string text=null,bool verbose=false){
if (!string.IsNullOrEmpty(text)){
text = $"{text}:";
}
return source.Do(_ => {
if (verbose){
Tracing.Tracer.LogVerboseText($"{_}");
Tracing.Tracer.LogVerboseText($"{text}{_}");
}
else{
Tracing.Tracer.LogText($"{_}");
Tracing.Tracer.LogText($"{text}{_}");
}
});
}

0 comments on commit c40aa70

Please sign in to comment.
You can’t perform that action at this time.