Exemplo n.º 1
0
 /// <summary>
 /// Deserialization constructor.
 /// </summary>
 /// <param name="serial"></param>
 internal APIKey(SerializableAPIKey serial)
     : this()
 {
     ID = serial.ID;
     VerificationCode = serial.VerificationCode;
     Type             = serial.Type;
     Expiration       = serial.Expiration;
     AccessMask       = serial.AccessMask;
     m_monitored      = serial.Monitored;
     IdentityIgnoreList.Import(serial.IgnoreList);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Exports the data to a serialization object.
        /// </summary>
        /// <returns></returns>
        internal SerializableAPIKey Export()
        {
            SerializableAPIKey serial = new SerializableAPIKey
            {
                ID = ID,
                VerificationCode = VerificationCode,
                Type             = Type,
                AccessMask       = AccessMask,
                Expiration       = Expiration,
                Monitored        = m_monitored,
                LastUpdate       = m_apiKeyInfoMonitor.LastUpdate,
            };

            serial.IgnoreList.AddRange(IdentityIgnoreList.Export());

            return(serial);
        }