示例#1
0
        internal static EventPipeSession Start(IpcEndpoint endpoint, IEnumerable <EventPipeProvider> providers, bool requestRundown, int circularBufferMB)
        {
            IpcMessage  requestMessage = CreateStartMessage(providers, requestRundown, circularBufferMB);
            IpcResponse?response       = IpcClient.SendMessageGetContinuation(endpoint, requestMessage);

            return(CreateSessionFromResponse(endpoint, ref response, nameof(Start)));
        }
示例#2
0
        /// <summary>
        /// Gets all environement variables and their values from the target process.
        /// </summary>
        /// <returns>A dictionary containing all of the environment variables defined in the target process.</returns>
        public Dictionary <string, string> GetProcessEnvironment()
        {
            IpcMessage message = CreateProcessEnvironmentMessage();

            using IpcResponse response = IpcClient.SendMessageGetContinuation(_endpoint, message);
            ValidateResponseMessage(response.Message, nameof(GetProcessEnvironmentAsync));

            ProcessEnvironmentHelper helper = ProcessEnvironmentHelper.Parse(response.Message.Payload);

            return(helper.ReadEnvironment(response.Continuation));
        }