public void Run()
        {
            string errorMessage;

            NamedPipeMessages.CompletionState state = NamedPipeMessages.CompletionState.Success;

            if (!TryEnablePrjFlt(this.tracer, out errorMessage))
            {
                state = NamedPipeMessages.CompletionState.Failure;
                this.tracer.RelatedError("Unable to install or enable PrjFlt. Enlistment root: {0} \nError: {1} ", this.request.EnlistmentRoot, errorMessage);
            }

            if (!string.IsNullOrEmpty(this.request.EnlistmentRoot))
            {
                if (!ProjFSFilter.TryAttach(this.request.EnlistmentRoot, out errorMessage))
                {
                    state = NamedPipeMessages.CompletionState.Failure;
                    this.tracer.RelatedError("Unable to attach filter to volume. Enlistment root: {0} \nError: {1} ", this.request.EnlistmentRoot, errorMessage);
                }
            }

            NamedPipeMessages.EnableAndAttachProjFSRequest.Response response = new NamedPipeMessages.EnableAndAttachProjFSRequest.Response();

            response.State        = state;
            response.ErrorMessage = errorMessage;

            this.WriteToClient(response.ToMessage(), this.connection, this.tracer);
        }
Пример #2
0
        public void Run()
        {
            string errorMessage;

            NamedPipeMessages.CompletionState state = NamedPipeMessages.CompletionState.Success;
            if (!GvFltFilter.TryAttach(this.tracer, this.request.EnlistmentRoot, out errorMessage))
            {
                state = NamedPipeMessages.CompletionState.Failure;
                this.tracer.RelatedError("Unable to attach filter to volume. Enlistment root: {0} \nError: {1} ", this.request.EnlistmentRoot, errorMessage);
            }

            this.WriteToClient(new NamedPipeMessages.AttachGvFltRequest.Response()
            {
                State = state, ErrorMessage = errorMessage
            });
        }
Пример #3
0
        public void Run()
        {
            string errorMessage;

            NamedPipeMessages.CompletionState state = NamedPipeMessages.CompletionState.Success;

            bool isExcluded;

            CheckAntiVirusExclusion(this.tracer, this.request.ExclusionPath, out isExcluded, out errorMessage);

            if (!isExcluded)
            {
                state = NamedPipeMessages.CompletionState.Failure;
            }

            this.WriteToClient(new NamedPipeMessages.ExcludeFromAntiVirusRequest.Response()
            {
                State = state, ErrorMessage = errorMessage
            });
        }