Exemplo n.º 1
0
        private static CarFileInfo MakeFileInfo(string filename)
        {
            CarFileInfo info = new CarFileInfo();

            info.PodDemo = false;

            if (filename.EndsWith("bv4", System.StringComparison.CurrentCultureIgnoreCase))
            {
                info.FileVersion = FileType.BV4;
            }
            if (filename.EndsWith("bv3", System.StringComparison.CurrentCultureIgnoreCase))
            {
                info.FileVersion = FileType.BV3;
            }
            if (filename.EndsWith("bv6", System.StringComparison.CurrentCultureIgnoreCase))
            {
                info.FileVersion = FileType.BV6;
            }
            if (filename.EndsWith("bv7", System.StringComparison.CurrentCultureIgnoreCase))
            {
                info.FileVersion = FileType.BV7;
            }

            return(info);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Car"/> class from the given <paramref name="stream"/>.
 /// </summary>
 /// <param name="stream">The <see cref="Stream"/> to load data from.</param>
 public Car(Stream stream, CarFileInfo info) : base(stream, info)
 {
 }