private IEnumerable <ExtensionDescriptor> HarvestExtensions(string path, string extensionType, string manifestName, bool manifestIsOptional) { string key = string.Format("{0}-{1}-{2}", path, manifestName, extensionType); return(_cacheManager.Get(key, ctx => { ctx.Monitor(_webSiteFolder.WhenPathChanges(path)); return AvailableExtensionsInFolder(path, extensionType, manifestName, manifestIsOptional).ToReadOnlyCollection(); })); }
public PlacementFile Parse(string virtualPath) { return(_cacheManager.Get(virtualPath, context => { context.Monitor(_webSiteFolder.WhenPathChanges(virtualPath)); var placementText = _webSiteFolder.ReadFile(virtualPath); return ParseImplementation(virtualPath, placementText); })); }
public ProjectFileDescriptor Parse(string virtualPath) { return(_cacheManager.Get(virtualPath, ctx => { ctx.Monitor(_webSiteFolder.WhenPathChanges(virtualPath)); string content = _webSiteFolder.ReadFile(virtualPath); using (var reader = new StringReader(content)) { return Parse(reader); } })); }
public PlacementFile Parse(string virtualPath) { return(_cacheManager.Get(virtualPath, true, context => { if (!DisableMonitoring) { Logger.Debug("Monitoring virtual path \"{0}\"", virtualPath); context.Monitor(_webSiteFolder.WhenPathChanges(virtualPath)); } var placementText = _webSiteFolder.ReadFile(virtualPath); return ParseText(placementText); })); }
public ProjectFileDescriptor Parse(string virtualPath) { return(_cacheManager.Get(virtualPath, ctx => { if (!DisableMonitoring) { Logger.Debug("Monitoring virtual path \"{0}\"", virtualPath); ctx.Monitor(_webSiteFolder.WhenPathChanges(virtualPath)); } string content = _webSiteFolder.ReadFile(virtualPath); using (var reader = new StringReader(content)) { return Parse(reader); } })); }