compositepresence.cs

来自「破解的飞信源代码」· CS 代码 · 共 56 行

CS
56
字号
namespace Imps.Client.Resource
{
    using Imps.Common;
    using System;

    public class CompositePresence
    {
        private Imps.Common.ClientTypeCategory? _ct;
        private Imps.Common.MainPresence _mp;

        public CompositePresence(Imps.Common.MainPresence mp, Imps.Common.ClientTypeCategory? ct)
        {
            this._mp = mp;
            this._ct = ct;
        }

        public override bool Equals(object obj)
        {
            CompositePresence presence = obj as CompositePresence;
            if (presence == null)
            {
                return false;
            }
            Imps.Common.ClientTypeCategory? clientTypeCategory = presence.ClientTypeCategory;
            Imps.Common.ClientTypeCategory? nullable2 = this.ClientTypeCategory;
            return (((clientTypeCategory.GetValueOrDefault() == nullable2.GetValueOrDefault()) && (clientTypeCategory.get_HasValue() == nullable2.get_HasValue())) && (presence.MainPresence == this.MainPresence));
        }

        public override int GetHashCode()
        {
            if (this._ct.get_HasValue())
            {
                return (int) (((Imps.Common.MainPresence) this._ct.get_Value()) + this._mp);
            }
            return (((int) this._mp) + 0x2710);
        }

        public Imps.Common.ClientTypeCategory? ClientTypeCategory
        {
            get
            {
                return this._ct;
            }
        }

        public Imps.Common.MainPresence MainPresence
        {
            get
            {
                return this._mp;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?