public virtual Stream OpenStreamForWrite(string streamName, string templateStreamName, ref object writeContext) { if (!IsAboveApplication(streamName)) { WebConfigurationManager.SuppressAppReload(true); } return(new FileStream(streamName, FileMode.Create, FileAccess.Write)); }
public virtual void WriteCompleted(string streamName, bool success, object writeContext, bool assertPermissions) { // There are probably other things to be done here, but for the moment we // just mark the completed write as one that should not cause application // reload. Note that it might already be too late for suppression, since the // FileSystemWatcher monitor might have already delivered the // notification. If the stream has been open using OpenStreamForWrite then // we're safe, though. if (!IsAboveApplication(streamName)) { WebConfigurationManager.SuppressAppReload(true); } }