private CaptureSession([NotNull] Snapshot snapshotBefore, [NotNull] FeedBuilder feedBuilder)
 {
     _snapshot = snapshotBefore;
     _feedBuilder = feedBuilder;
 }
Beispiel #2
0
        /// <summary>
        /// Takes a snapshot of the current system state.
        /// </summary>
        /// <returns>The newly created snapshot.</returns>
        /// <exception cref="IOException">There was an error accessing the registry or file system.</exception>
        /// <exception cref="UnauthorizedAccessException">Read access to the registry or file system was not permitted.</exception>
        /// <exception cref="PlatformNotSupportedException">This method is called while running on a platform for which capturing is not supported.</exception>
        public static Snapshot Take()
        {
            if (!WindowsUtils.IsWindows) throw new PlatformNotSupportedException(Resources.OnlyAvailableOnWindows);

            var snapshot = new Snapshot();
            snapshot.TakeRegistry();
            snapshot.TakeFileSystem();
            return snapshot;
        }