Exemplo n.º 1
0
 /// <summary>
 /// Finds the API key with access to the specified API method.
 /// </summary>
 /// <param name="method">The method.</param>
 /// <returns>The API key with access to the specified method or null if non found.</returns>
 public APIKey FindAPIKeyWithAccess(CCPAPICorporationMethods method)
 => CorporationTypeAPIKeys
 .FirstOrDefault(apiKey => apiKey.Monitored && (ulong)method == (apiKey.AccessMask & (ulong)method));
Exemplo n.º 2
0
 /// <summary>
 /// Finds the API key with access to the specified API method.
 /// </summary>
 /// <param name="method">The method.</param>
 /// <returns>The API key with access to the specified method or null if non found.</returns>
 public APIKey FindAPIKeyWithAccess(CCPAPICorporationMethods method)
     => CorporationTypeAPIKeys
         .FirstOrDefault(apiKey => apiKey.Monitored && (ulong)method == (apiKey.AccessMask & (ulong)method));