Ejemplo n.º 1
0
 /// <summary>
 /// Creates instance for test
 /// </summary>
 public SandboxedProcessInfo(
     PathTable pathTable,
     [CanBeNull] ISandboxedProcessFileStorage fileStorage,
     string fileName,
     bool disableConHostSharing,
     LoggingContext loggingContext,
     bool testRetries = false,
     IDetoursEventListener detoursEventListener                = null,
     ISandboxConnection sandboxConnection                      = null,
     ContainerConfiguration containerConfiguration             = null,
     FileAccessManifest fileAccessManifest                     = null,
     bool createJobObjectForCurrentProcess                     = true,
     SandboxedProcessResourceMonitoringConfig monitoringConfig = null
     )
     : this(
         pathTable,
         fileStorage,
         fileName,
         fileAccessManifest ?? new FileAccessManifest(pathTable),
         disableConHostSharing,
         containerConfiguration ?? ContainerConfiguration.DisabledIsolation,
         loggingContext,
         testRetries,
         detoursEventListener,
         sandboxConnection,
         createJobObjectForCurrentProcess : createJobObjectForCurrentProcess,
         monitoringConfig : monitoringConfig)
 {
     Contract.RequiresNotNull(pathTable);
     Contract.RequiresNotNull(fileName);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates instance
        /// </summary>
        public SandboxedProcessInfo(
            PathTable pathTable,
            [CanBeNull] ISandboxedProcessFileStorage fileStorage,
            string fileName,
            FileAccessManifest fileAccessManifest,
            bool disableConHostSharing,
            ContainerConfiguration containerConfiguration,
            LoggingContext loggingContext,
            bool testRetries = false,
            IDetoursEventListener detoursEventListener = null,
            ISandboxConnection sandboxConnection       = null,
            SidebandWriter sidebandWriter         = null,
            bool createJobObjectForCurrentProcess = true,
            ISandboxFileSystemView fileSystemView = null,
            SandboxedProcessResourceMonitoringConfig monitoringConfig = null)
        {
            Contract.RequiresNotNull(pathTable);
            Contract.RequiresNotNull(fileName);

            PathTable             = pathTable;
            FileAccessManifest    = fileAccessManifest;
            FileStorage           = fileStorage;
            FileName              = fileName;
            DisableConHostSharing = disableConHostSharing;

            // This should be set for testing purposes only.
            TestRetries = testRetries;

            NestedProcessTerminationTimeout = DefaultNestedProcessTerminationTimeout;
            LoggingContext                   = loggingContext;
            DetoursEventListener             = detoursEventListener;
            SandboxConnection                = sandboxConnection;
            ContainerConfiguration           = containerConfiguration;
            SidebandWriter                   = sidebandWriter;
            CreateJobObjectForCurrentProcess = createJobObjectForCurrentProcess;
            FileSystemView                   = fileSystemView;
            MonitoringConfig                 = monitoringConfig;
        }
Ejemplo n.º 3
0
 /// <remarks>
 /// This constructor is never used in this project, but there exist external projects that
 /// compile against this assembly and already depend on this constructor.
 /// </remarks>
 public SandboxedProcessInfo(
     [CanBeNull] ISandboxedProcessFileStorage fileStorage,
     string fileName,
     bool disableConHostSharing,
     bool testRetries = false,
     LoggingContext loggingContext = null,
     IDetoursEventListener detoursEventListener = null,
     ISandboxConnection sandboxConnection       = null,
     bool createJobObjectForCurrentProcess      = true,
     SandboxedProcessResourceMonitoringConfig monitoringConfig = null)
     : this(
         new PathTable(),
         fileStorage,
         fileName,
         disableConHostSharing,
         loggingContext ?? new LoggingContext("ExternalComponent"),
         testRetries,
         detoursEventListener,
         sandboxConnection,
         createJobObjectForCurrentProcess : createJobObjectForCurrentProcess,
         monitoringConfig : monitoringConfig)
 {
 }