Beispiel #1
0
        private AnonymousPipeServerStream CreateAndVerifyAnonymousPipe(
            PipeSecurity expectedSecurity,
            PipeDirection direction             = DefaultPipeDirection,
            HandleInheritability inheritability = DefaultInheritability,
            int bufferSize = DefaultBufferSize)
        {
            AnonymousPipeServerStream pipe = AnonymousPipeServerStreamAcl.Create(direction, inheritability, bufferSize, expectedSecurity);

            Assert.NotNull(pipe);

            if (expectedSecurity != null)
            {
                PipeSecurity actualSecurity = pipe.GetAccessControl();
                VerifyPipeSecurity(expectedSecurity, actualSecurity);
            }

            return(pipe);
        }