Collapse ILibraryReadOnlyStream into ILibraryContentStream

This commit is contained in:
John Lewin 2018-02-10 21:53:58 -08:00
parent fd59371cbc
commit 68f7c2fa12
6 changed files with 13 additions and 14 deletions

View file

@ -1449,7 +1449,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
return null;
}
private class ReadOnlyStreamItem : ILibraryReadOnlyStream
public class ReadOnlyStreamItem : ILibraryContentStream
{
private Func<Task<StreamAndLength>> streamSource;
@ -1464,10 +1464,18 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
public string Name { get; set; }
public string FileName { get; set; }
public bool IsProtected { get; set; }
public bool IsVisible { get; set; }
public long FileSize => 0;
public string AssetPath => "";
public bool LocalContentExists => true;
public Task<StreamAndLength> GetContentStream(Action<double, string> progress)
{
return streamSource?.Invoke();