Beispiel #1
0
        public object ReadYaml(Core.IParser parser, System.Type type)
        {
            var value = ((Core.Events.Scalar)parser.Current).Value;

            parser.MoveNext();
            return(new System.Guid(value));
        }
Beispiel #2
0
        public object ReadYaml(Core.IParser parser, System.Type type)
        {
            var value = ((Core.Events.Scalar)parser.Current).Value;

            parser.MoveNext();
            if (value.Contains("."))
            {
                int n = value.Length - value.IndexOf(".") - 1;
                Mugen3D.Core.Number result = int.Parse(value.Replace(".", ""));
                for (int i = 0; i < n; i++)
                {
                    result = result / 10;
                }
                return(result);
            }
            return((Mugen3D.Core.Number) int.Parse(value));
        }