AppRootContainsWebPagesFile() static private method

static private AppRootContainsWebPagesFile ( IFileSystem fileSystem, string path ) : bool
fileSystem IFileSystem
path string
return bool
Exemplo n.º 1
0
        private static void OnChanged(string key, object value, CacheItemRemovedReason reason)
        {
            // Only handle case when the dependency has changed.
            if (reason != CacheItemRemovedReason.DependencyChanged)
            {
                return;
            }

            // Scan the app root for a webpages file
            if (
                WebPagesDeployment.AppRootContainsWebPagesFile(
                    _physicalFileSystem,
                    HttpRuntime.AppDomainAppPath
                    )
                )
            {
                // Unload the app domain so we register plan9 when the app restarts
                InfrastructureHelper.UnloadAppDomain();
            }
            else
            {
                // We need to re-register since the item was removed from the cache
                RegisterForChangeNotifications();
            }
        }