예제 #1
0
        static UnityVersion ParseUnityVersion(string unityVersion)
        {
            Queue <char> chars = new Queue <char>();

            for (int i = 0; i < unityVersion.Length; i++)
            {
                chars.Enqueue(unityVersion[i]);
            }

            UnityVersion       version       = new UnityVersion();
            UnityVersionParser versionParser = new UnityVersionParser(version);

            while (chars.Count > 0)
            {
                char current = chars.Dequeue();
                versionParser.HandleState(current);
            }

            return(version);
        }
예제 #2
0
 public UnityVersionParser(UnityVersion versionObject)
 {
     this.versionObject  = versionObject;
     this.currentState   = VersionState.SettingMajor;
     this.currentPointer = MajorState;
 }