static Int32 Main(String[] args)
 {
     try {
         if (args.Length == 0)
         {
             Error.WriteLine(Usage);
             return(ArgumentErrorCode);
         }
         var c = args[0];
         if (ListCommand.StartsWith(c, OrdinalIgnoreCase))
         {
             if (args.Length != 2)
             {
                 Error.WriteLine(Usage);
                 return(ArgumentErrorCode);
             }
             WriteLine(Join(NewLine,
                            new FileInfo(args[1])
                            .ListExtendedAttributes()));
             return(SuccessCode);
         }
         else if (GetCommand.StartsWith(c, OrdinalIgnoreCase))
         {
             if (args.Length != 3)
             {
                 Error.WriteLine(Usage);
                 return(ArgumentErrorCode);
             }
             OpenStandardOutput().Write(
                 new FileInfo(args[1])
                 .GetExtendedAttribute(args[2]).Span);
             return(SuccessCode);
         }
         else if (SetCommand.StartsWith(c, OrdinalIgnoreCase))
         {
             if (args.Length != 4)
             {
                 Error.WriteLine(Usage);
                 return(ArgumentErrorCode);
             }
             new FileInfo(args[1])
             .SetExtendedAttributeString(args[2], args[3]);
             return(SuccessCode);
         }
         else if (DeleteCommand.StartsWith(c, OrdinalIgnoreCase))
         {
             if (args.Length != 3)
             {
                 Error.WriteLine(Usage);
                 return(ArgumentErrorCode);
             }
             new FileInfo(args[1]).DeleteExtendedAttribute(args[2]);
             return(SuccessCode);
         }
         else
         {
             Error.WriteLine(Usage);
             return(ArgumentErrorCode);
         }
     } catch (Exception e) {
         Error.WriteLine(e.Message);
         return(FailureCode);
     }
 }