public static void Init(TaleEnvironmentType type) { if (_instance != null) { throw new InvalidOperationException("Cannot initialize an already created environment"); } _taleType = type; }
public static TaleEnvironment Create(TaleEnvironmentType value) { switch (value) { case TaleEnvironmentType.PATHFINDER: return new PathfinderTaleEnvironment(); default: throw new UnmanagedTaleEnvironmentTypeException(value); } }
public UnmanagedTaleEnvironmentTypeException(TaleEnvironmentType value) : base(string.Format("Invalid tale type: {0}", value)) { Value = value; }