System.Net.Tests.UrlPrefix.CreateLocal C# (CSharp) Method

CreateLocal() public static method

public static CreateLocal ( ) : string
return string
        public static string CreateLocal()
        {
            return $"{ProcessPrefix}{Guid.NewGuid():N}/";
        }
    }

Usage Example

Beispiel #1
0
        public async Task TestAnonymousAuthentication()
        {
            string       url      = UrlPrefix.CreateLocal();
            HttpListener listener = new HttpListener();

            try
            {
                listener.Prefixes.Add(url);
                listener.AuthenticationSchemes = AuthenticationSchemes.Anonymous;
                listener.Start();

                await ValidateNullUser(url, listener);
            }
            finally
            {
                listener.Stop();
                listener.Close();
            }
        }
All Usage Examples Of System.Net.Tests.UrlPrefix::CreateLocal