Exemple #1
0
 /// <summary>
 ///     Creates a new Corporation. If the Key is initialized, the Corporation will also be initialized with data from the
 ///     Key.
 /// </summary>
 /// <param name="apiKey">A CorporationKey</param>
 /// <param name="corporationId">A valid Eve Online Corporation ID</param>
 public Corporation(CorporationKey apiKey, long corporationId) {
     Contract.Requires(apiKey != null);
     ApiKey = apiKey;
     CorporationId = corporationId;
     if (ApiKey.IsInitialized)
         ensureInitialized();
 }
Exemple #2
0
 /// <summary>
 ///     Creates a new Corporation, preserving the initialized data and key from the passed in entity
 /// </summary>
 /// <param name="apiKey"></param>
 /// <param name="entity"></param>
 internal Corporation(CorporationKey apiKey, ApiKeyInfo.ApiKeyEntity entity) {
     ApiKey = apiKey;
     CorporationId = entity.CorporationId;
     CorporationName = entity.CorporationName;
     AllianceId = entity.AllianceId;
     AllianceName = entity.AllianceName;
     FactionId = entity.FactionId;
     FactionName = entity.FactionName;
     BaseUri = apiKey.BaseUri;
     IsInitialized = true;
 }
Exemple #3
0
 /// <summary>
 ///     Creates a new corporation. This object will not be initialized.
 /// </summary>
 /// <param name="keyId"></param>
 /// <param name="vCode"></param>
 /// <param name="corporationId"></param>
 public Corporation(int keyId, string vCode, long corporationId) {
     ApiKey = new CorporationKey(keyId, vCode);
     CorporationId = corporationId;
 }