public static PathCommandArgs Parse(PathCommandType commandType, string sequence, PathLocationInfo pathLocationInfo = null) { PathCommandArgs commandArgs = CreateInstance(commandType); commandArgs.PathLocationInfo = pathLocationInfo; commandArgs.UseRelativeCoordinates = Char.IsLower(sequence.First()); commandArgs.ParseCore(sequence.Substring(1), pathLocationInfo); return(commandArgs); }
protected virtual void ParseCore(string sequence, PathLocationInfo pathLocationInfo = null) { Type = GetPathCommandType(sequence.First()); Args = PathCommandArgs.Parse(Type, sequence); }