AGS.Editor.Utils.AlternateStreams.GetZoneIdentifier C# (CSharp) Méthode

GetZoneIdentifier() public static méthode

public static GetZoneIdentifier ( string path ) : uint
path string
Résultat 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;
        }