internal static bool TryParseCore(string input, out ServiceName result, out string remainder)
        {
            result    = ServiceName.Empty;
            remainder = null;

            // Parse the environment name portion
            ServiceHostInstanceName shiName;
            string sPart;

            if (!ServiceHostInstanceName.TryParseCore(input, out shiName, out sPart) || String.IsNullOrEmpty(sPart))
            {
                return(false);
            }

            var match = Parser.Match(sPart);

            if (!match.Success)
            {
                return(false);
            }
            else
            {
                result = new ServiceName(
                    shiName,
                    match.Groups["service"].Value);
                if (match.Groups["rest"].Success)
                {
                    remainder = match.Groups["rest"].Value;
                }
                return(true);
            }
        }
Exemple #2
0
 public ServiceHostDescription(ServiceHostInstanceName instanceName, string machineName)
 {
     InstanceName = instanceName;
     MachineName  = machineName;
 }
 public ServiceName(ServiceHostInstanceName instance, string name) : this()
 {
     Instance = instance;
     Name     = name.ToLowerInvariant();
 }