コード例 #1
0
        private static string?GetDefaultPipeName()
        {
            // BaseDirectory was mistakenly marked as nullable in 3.1
            // https://github.com/dotnet/runtime/pull/32486
            var clientDirectory = AppDomain.CurrentDomain.BaseDirectory !;

            return(BuildServerConnection.GetPipeNameForPath(clientDirectory));
        }
コード例 #2
0
ファイル: BuildClientTests.cs プロジェクト: belav/roslyn
            public void GetPipeNameForPathOptLength()
            {
                var path = string.Format(@"q:{0}the{0}path", Path.DirectorySeparatorChar);
                var name = BuildServerConnection.GetPipeNameForPath(path);

                // We only have ~50 total bytes to work with on mac, so the base path must be small
                Assert.Equal(43, name.Length);
            }
コード例 #3
0
            public void GetPipeNameForPathOptSlashes()
            {
                var path = string.Format(@"q:{0}the{0}path", Path.DirectorySeparatorChar);
                var name = BuildServerConnection.GetPipeNameForPath(path);

                Assert.Equal(name, BuildServerConnection.GetPipeNameForPath(path));
                Assert.Equal(name, BuildServerConnection.GetPipeNameForPath(path + Path.DirectorySeparatorChar));
                Assert.Equal(name, BuildServerConnection.GetPipeNameForPath(path + Path.DirectorySeparatorChar + Path.DirectorySeparatorChar));
            }