Ejemplo n.º 1
0
        public void MergeFrom(ExpirySettings other)
        {
            if (other == null)
            {
                return;
            }
            if (other.ExpiryType != global::PKIo.ExpiryType.ExpireNone)
            {
                ExpiryType = other.ExpiryType;
            }
            switch (other.ExpiryOneofCase)
            {
            case ExpiryOneofOneofCase.FixedExpiryDate:
                if (FixedExpiryDate == null)
                {
                    FixedExpiryDate = new global::PKIo.Date();
                }
                FixedExpiryDate.MergeFrom(other.FixedExpiryDate);
                break;

            case ExpiryOneofOneofCase.ExpireAfterXDays:
                ExpireAfterXDays = other.ExpireAfterXDays;
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ExpiryType != global::PKIo.ExpiryType.ExpireNone)
            {
                hash ^= ExpiryType.GetHashCode();
            }
            if (expiryOneofCase_ == ExpiryOneofOneofCase.FixedExpiryDate)
            {
                hash ^= FixedExpiryDate.GetHashCode();
            }
            if (expiryOneofCase_ == ExpiryOneofOneofCase.ExpireAfterXDays)
            {
                hash ^= ExpireAfterXDays.GetHashCode();
            }
            hash ^= (int)expiryOneofCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }