From e755dd0c3fa47a4d0fddb4feb934c5176f0956f5 Mon Sep 17 00:00:00 2001 From: Roland Pheasant Date: Tue, 17 Nov 2015 20:23:49 +0000 Subject: [PATCH] Update Assembly info --- Source/TailBlazer.Domain/Properties/AssemblyInfo.cs | 8 ++++---- Source/TailBlazer/Properties/AssemblyInfo.cs | 6 +++--- Source/TailBlazer/Views/FileTailerViewModel.cs | 13 +++++++++---- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Source/TailBlazer.Domain/Properties/AssemblyInfo.cs b/Source/TailBlazer.Domain/Properties/AssemblyInfo.cs index 6f1c2e8f..659cf2b4 100644 --- a/Source/TailBlazer.Domain/Properties/AssemblyInfo.cs +++ b/Source/TailBlazer.Domain/Properties/AssemblyInfo.cs @@ -5,12 +5,12 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("TailBlazer.Domain")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyTitle("Tail Blazer")] +[assembly: AssemblyDescription("Tail blazer is a file tail utility")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("TailBlazer.Domain")] -[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyProduct("TailBlazer")] +[assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/Source/TailBlazer/Properties/AssemblyInfo.cs b/Source/TailBlazer/Properties/AssemblyInfo.cs index 9965b9d0..9ce3abef 100644 --- a/Source/TailBlazer/Properties/AssemblyInfo.cs +++ b/Source/TailBlazer/Properties/AssemblyInfo.cs @@ -7,12 +7,12 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("TailBlazer")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyTitle("Tail Blazer")] +[assembly: AssemblyDescription("Tail blazer is a file tail utility")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("TailBlazer")] -[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/Source/TailBlazer/Views/FileTailerViewModel.cs b/Source/TailBlazer/Views/FileTailerViewModel.cs index 8d3590a4..343634b8 100644 --- a/Source/TailBlazer/Views/FileTailerViewModel.cs +++ b/Source/TailBlazer/Views/FileTailerViewModel.cs @@ -32,17 +32,21 @@ public FileTailerViewModel(ILogger logger,ISchedulerProvider schedulerProvider, if (schedulerProvider == null) throw new ArgumentNullException(nameof(schedulerProvider)); if (fileInfo == null) throw new ArgumentNullException(nameof(fileInfo)); + + //user entered filter var filterRequest = this.WhenValueChanged(vm => vm.SearchText).Throttle(TimeSpan.FromMilliseconds(125)); + + //define scroll to observable var autoChanged = this.WhenValueChanged(vm => vm.AutoTail); - var scroller = _userScrollRequested - .CombineLatest(autoChanged, (user, auto) => + var scroller = _userScrollRequested.CombineLatest(autoChanged, (user, auto) => { - var mode = AutoTail ? ScrollingMode.Tail : ScrollingMode.User; + var mode = auto ? ScrollingMode.Tail : ScrollingMode.User; return new ScrollRequest(mode, user.PageSize, user.FirstIndex); }) - .Sample(TimeSpan.FromMilliseconds(50)) + .Sample(TimeSpan.FromMilliseconds(125)) .DistinctUntilChanged(); + //construct tailer var tailer = new FileTailer(fileInfo, filterRequest, scroller); @@ -91,6 +95,7 @@ void IScrollReceiver.ScrollTo(ScrollBoundsArgs boundsArgs) if (boundsArgs == null) throw new ArgumentNullException(nameof(boundsArgs)); var mode = AutoTail ? ScrollingMode.Tail : ScrollingMode.User; + //TODO: get rid of subject (alas each time I have tried to get rid of it, scrolling has been messed up!) _userScrollRequested.OnNext(new ScrollRequest(mode, boundsArgs.PageSize,boundsArgs.FirstIndex)); PageSize = boundsArgs.PageSize; FirstIndex = boundsArgs.FirstIndex;