Changes to address IFileSystem.Watch method addition

Absorbs the new IFileSystem interface. This change is to just address the breaking change introduced in IFileSystem.
Razor has to do the necessary changes to subscribe to the Watch event for expiring the modified files.
This commit is contained in:
Praburaj 2014-12-09 16:37:56 -08:00
parent 09b01d8f32
commit 3dfcc884fe
4 changed files with 14 additions and 7 deletions

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Concurrent;
using Microsoft.AspNet.FileSystems;
using Microsoft.Framework.OptionsModel;
using Microsoft.Framework.Expiration.Interfaces;
namespace Microsoft.AspNet.Mvc.Razor
{
@ -71,6 +72,12 @@ namespace Microsoft.AspNet.Mvc.Razor
}
}
/// <inheritdoc />
public IExpirationTrigger Watch(string filter)
{
return _fileSystem.Watch(filter);
}
private class ExpiringFileInfo
{
public IFileInfo FileInfo { get; set; }

View File

@ -5,7 +5,6 @@ using System;
using System.IO;
using System.Text;
using Microsoft.AspNet.FileSystems;
using Microsoft.Framework.Expiration.Interfaces;
namespace Microsoft.AspNet.Mvc.Razor
{
@ -61,10 +60,5 @@ namespace Microsoft.AspNet.Mvc.Razor
{
throw new NotSupportedException();
}
public IExpirationTrigger CreateFileChangeTrigger()
{
throw new NotSupportedException();
}
}
}

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.AspNet.FileSystems;
using Microsoft.Framework.Expiration.Interfaces;
namespace Microsoft.AspNet.Mvc.Razor
{
@ -53,5 +54,9 @@ namespace Microsoft.AspNet.Mvc.Razor
}
}
public IExpirationTrigger Watch(string filter)
{
throw new NotImplementedException();
}
}
}

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using Microsoft.AspNet.FileSystems;
using Microsoft.Framework.OptionsModel;
using Microsoft.Framework.Expiration.Interfaces;
using Moq;
using Xunit;
@ -404,7 +405,7 @@ namespace Microsoft.AspNet.Mvc.Razor
}
}
public bool TryGetParentPath(string subpath, out string parentPath)
public IExpirationTrigger Watch(string filter)
{
throw new NotImplementedException();
}