AGS.Editor.Utils.AlternateStreams.GetZoneIdentifier C# (CSharp) Method

GetZoneIdentifier() public static method

public static GetZoneIdentifier ( string path ) : uint
path string
return uint
        public static uint GetZoneIdentifier(string path)
        {
            string[] text = ReadTextFromAlternateStream(path, "Zone.Identifier");
            string[] keyValue;

            try
            {
                keyValue = text[1].Split('=');
            }
            catch
            {
                return URLZONE_LOCAL_MACHINE;
            }

            if (keyValue[0].ToLower() == "zoneid" && keyValue.Length == 2)
            {
                uint zoneNumber;
                if (UInt32.TryParse(keyValue[1], out zoneNumber))
                {
                    return zoneNumber;
                }
            }

            return URLZONE_LOCAL_MACHINE;
        }