public static bool TryParse()

in wwauth/Google.Solutions.WWAuth/Data/IdentityPoolConfiguration.cs [149:178]


        public static bool TryParse(
            string audience,
            out WorkforceIdentityPoolConfiguration configuration)
        {
            configuration = null;

            if (audience == null)
            {
                return false;
            }

            var audienceMatch = new Regex(
                "^//iam.googleapis.com/locations/(.+)/workforcePools/" +
                "(.+)/providers/(.+)$").Match(audience);
            if (audienceMatch.Success)
            {
                configuration = new WorkforceIdentityPoolConfiguration()
                {
                    Location = audienceMatch.Groups[1].Value,
                    PoolName = audienceMatch.Groups[2].Value,
                    ProviderName = audienceMatch.Groups[3].Value
                };

                return true;
            }
            else
            {
                return false;
            }
        }