powerfun-unity/Assets/Scripts/ConfigHelper.cs

74 lines
2.0 KiB
C#
Raw Normal View History

2021-03-25 17:18:51 +08:00
using Assets.Scripts.Apis;
using Assets.Scripts.Apis.Models;
using System;
2021-03-22 16:05:40 +08:00
using System.Collections.Generic;
using System.Linq;
using System.Net;
2021-03-22 16:05:40 +08:00
using System.Text;
using System.Threading.Tasks;
namespace Assets.Scripts
{
2021-04-21 11:19:31 +08:00
public static class ConfigHelper
2021-03-22 16:05:40 +08:00
{
2021-03-25 16:53:39 +08:00
public static string Host = App.Host;
2021-03-22 16:05:40 +08:00
2021-03-25 16:53:39 +08:00
public static string AppVersion = App.AppVersion;
2021-04-21 11:19:31 +08:00
public static UserApi _userApi;
public static UserApi userApi
{
get
{
if (_userApi == null) _userApi = new UserApi();
return _userApi;
}
}
2021-04-21 16:16:14 +08:00
private static MapApi _mapApi;
public static MapApi mapApi
{
get
{
if (_mapApi == null) _mapApi = new MapApi();
return _mapApi;
}
}
private static MapInterruptRecordApi _mapInterruptRecordApi;
public static MapInterruptRecordApi mapInterruptRecordApi
{
get
{
if (_mapInterruptRecordApi == null) _mapInterruptRecordApi = new MapInterruptRecordApi();
return _mapInterruptRecordApi;
}
}
public static ThirdPartApi _thirdPartApi;
public static ThirdPartApi thirdPartApi
{
get
{
if (_thirdPartApi == null) _thirdPartApi = new ThirdPartApi();
return _thirdPartApi;
}
}
2021-07-20 09:58:01 +08:00
private static MapCompetitionApi _mapCompetitionApi;
internal static MapCompetitionApi mapCompetitionApi
{
get
{
if (_mapCompetitionApi == null) _mapCompetitionApi = new MapCompetitionApi();
return _mapCompetitionApi;
}
}
2021-09-23 18:14:53 +08:00
private static RowerApi _rowerApi;
internal static RowerApi rowerApi
{
get
{
if (_rowerApi == null) _rowerApi = new RowerApi();
return _rowerApi;
}
}
2021-03-22 16:05:40 +08:00
}
}