AK.F1.Timing.Model.Grid.GridModelBase.Create C# (CSharp) 메소드

Create() 공개 정적인 메소드

Creates a grid model for the specified session type.
/// Thrown when is not a valid session type. ///
public static Create ( SessionType type ) : GridModelBase
type SessionType The type of grid model to create.
리턴 GridModelBase
        public static GridModelBase Create(SessionType type)
        {
            switch(type)
            {
                case SessionType.None:
                    return NullGridModel.Instance;
                case SessionType.Practice:
                    return new PracticeGridModel();
                case SessionType.Qually:
                    return new QuallyGridModel();
                case SessionType.Race:
                    return new RaceGridModel();
                default:
                    throw Guard.ArgumentOutOfRange("type");
            }
        }
GridModelBase