Ejemplo n.º 1
0
 internal static async Task <CoreClient> GetClient()
 {
     if (!Initialized)
     {
         throw new InvalidOperationException("Configure must be initialized before getting a client.");
     }
     return(_client ?? (_client = await CoreClient.Create(BaseLocation, IndexLocation)));
 }
Ejemplo n.º 2
0
 static async Task <IEnumerable <Weapon> > GetWeapons(CoreClient client)
 {
     return(JsonConvert.DeserializeObject <WeaponExport>(
                await client.GetData(CoreDataType.Weapons)).ExportWeapons);
 }