Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

Commit

Permalink
Set modified date in EmbeddedFileProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennanConroy committed Jun 30, 2016
1 parent b58bbe0 commit 721cd3a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,15 @@ public EmbeddedFileProvider(Assembly assembly, string baseNamespace)

_baseNamespace = string.IsNullOrEmpty(baseNamespace) ? string.Empty : baseNamespace + ".";
_assembly = assembly;
// REVIEW: Does this even make sense?
_lastModified = DateTimeOffset.MaxValue;

_lastModified = DateTimeOffset.Now;

#if NETSTANDARD1_5
if (_assembly.Location != null)
{
_lastModified = new FileInfo(_assembly.Location).LastWriteTime;
}
#endif
}

/// <summary>
Expand Down
9 changes: 6 additions & 3 deletions src/Microsoft.Extensions.FileProviders.Embedded/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@
"version": "1.1.0-*",
"type": "build"
},
"Microsoft.Extensions.FileProviders.Abstractions": "1.1.0-*"
"Microsoft.Extensions.FileProviders.Abstractions": "1.1.0-*",
"System.Runtime.Extensions": "4.1.0-*"
},
"frameworks": {
"netstandard1.0": {
"netstandard1.0": { },
"netstandard1.5": {
"dependencies": {
"System.Runtime.Extensions": "4.1.0-*"
"System.IO.FileSystem": "4.0.1-*",
"System.Reflection": "4.1.0-*"
}
}
}
Expand Down

0 comments on commit 721cd3a

Please sign in to comment.