Esempio n. 1
0
        static void Main(string[] args)
        {
            var id  = new SeqId("XR_242110", 1);
            var fac = new EntrezSequenceFactory();
            var seq = fac.Get(id);

            Console.WriteLine($"{id.ToString()} at 0 = {seq[0]}");
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Command.Length != 0)
            {
                hash ^= Command.GetHashCode();
            }
            if (SeqId != 0L)
            {
                hash ^= SeqId.GetHashCode();
            }
            if (RetryCount != 0)
            {
                hash ^= RetryCount.GetHashCode();
            }
            if (PayloadData.Length != 0)
            {
                hash ^= PayloadData.GetHashCode();
            }
            if (userInstance_ != null)
            {
                hash ^= UserInstance.GetHashCode();
            }
            if (ErrorCode != 0)
            {
                hash ^= ErrorCode.GetHashCode();
            }
            if (settingInfo_ != null)
            {
                hash ^= SettingInfo.GetHashCode();
            }
            if (requestBasicInfo_ != null)
            {
                hash ^= RequestBasicInfo.GetHashCode();
            }
            if (SubBiz.Length != 0)
            {
                hash ^= SubBiz.GetHashCode();
            }
            if (frontendInfo_ != null)
            {
                hash ^= FrontendInfo.GetHashCode();
            }
            if (Kpn.Length != 0)
            {
                hash ^= Kpn.GetHashCode();
            }
            if (AnonymouseUser != false)
            {
                hash ^= AnonymouseUser.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (AppId != 0)
            {
                hash ^= AppId.GetHashCode();
            }
            if (Uid != 0L)
            {
                hash ^= Uid.GetHashCode();
            }
            if (InstanceId != 0L)
            {
                hash ^= InstanceId.GetHashCode();
            }
            if (Flags != 0)
            {
                hash ^= Flags.GetHashCode();
            }
            if (EncodingType != global::AcFunDanmu.PacketHeader.Types.EncodingType.KEncodingNone)
            {
                hash ^= EncodingType.GetHashCode();
            }
            if (DecodedPayloadLen != 0)
            {
                hash ^= DecodedPayloadLen.GetHashCode();
            }
            if (EncryptionMode != global::AcFunDanmu.PacketHeader.Types.EncryptionMode.KEncryptionNone)
            {
                hash ^= EncryptionMode.GetHashCode();
            }
            if (tokenInfo_ != null)
            {
                hash ^= TokenInfo.GetHashCode();
            }
            if (SeqId != 0L)
            {
                hash ^= SeqId.GetHashCode();
            }
            hash ^= features_.GetHashCode();
            if (Kpn.Length != 0)
            {
                hash ^= Kpn.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 4
0
    public override int GetHashCode()
    {
        int hashcode = 157;

        unchecked {
            if (__isset.eMid)
            {
                hashcode = (hashcode * 397) + EMid.GetHashCode();
            }
            if (__isset.mid)
            {
                hashcode = (hashcode * 397) + Mid.GetHashCode();
            }
            if (__isset.direction)
            {
                hashcode = (hashcode * 397) + Direction.GetHashCode();
            }
            if (__isset.method)
            {
                hashcode = (hashcode * 397) + Method.GetHashCode();
            }
            if (__isset.param)
            {
                hashcode = (hashcode * 397) + Param.GetHashCode();
            }
            if (__isset.timestamp)
            {
                hashcode = (hashcode * 397) + Timestamp.GetHashCode();
            }
            if (__isset.seqId)
            {
                hashcode = (hashcode * 397) + SeqId.GetHashCode();
            }
            if (__isset.displayName)
            {
                hashcode = (hashcode * 397) + DisplayName.GetHashCode();
            }
            if (__isset.picturePath)
            {
                hashcode = (hashcode * 397) + PicturePath.GetHashCode();
            }
            if (__isset.pictureStatus)
            {
                hashcode = (hashcode * 397) + PictureStatus.GetHashCode();
            }
        }
        return(hashcode);
    }
Esempio n. 5
0
 public Spdi(SeqId id, uint from, string del, string ins)
 {
     if (id == null)
     {
         throw new ArgumentNullException("id");
     }
     if (del == null)
     {
         throw new ArgumentNullException("del");
     }
     if (ins == null)
     {
         throw new ArgumentNullException("ins");
     }
     SeqId    = id;
     From     = from;
     Deleted  = del;
     Inserted = ins;
 }
Esempio n. 6
0
        public ISequence Get(SeqId id)
        {
            if (id == null)
            {
                throw new ArgumentNullException("id");
            }
            ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); };
            WebClient web     = new WebClient();
            string    address = $"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id={id.ToString()}&rettype=fasta&retmode=text";
            var       fasta   = web.DownloadString(address);
            var       result  = fasta.Split('\n');
            var       sb      = new StringBuilder();

            for (int i = 1; i < result.Length; ++i)
            {
                sb.Append(result[i]);
            }
            return(SequenceUtils.SequenceFromString(id, sb.ToString()));
        }
Esempio n. 7
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Command.Length != 0)
            {
                hash ^= Command.GetHashCode();
            }
            if (SeqId != 0L)
            {
                hash ^= SeqId.GetHashCode();
            }
            if (ErrorCode != 0)
            {
                hash ^= ErrorCode.GetHashCode();
            }
            if (PayloadData.Length != 0)
            {
                hash ^= PayloadData.GetHashCode();
            }
            if (ErrorMsg.Length != 0)
            {
                hash ^= ErrorMsg.GetHashCode();
            }
            if (ErrorData.Length != 0)
            {
                hash ^= ErrorData.GetHashCode();
            }
            if (SubBiz.Length != 0)
            {
                hash ^= SubBiz.GetHashCode();
            }
            if (KlinkPushId != 0L)
            {
                hash ^= KlinkPushId.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 8
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("FriendRequest(");
        bool __first = true;

        if (EMid != null && __isset.eMid)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("EMid: ");
            EMid.ToString(sb);
        }
        if (Mid != null && __isset.mid)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Mid: ");
            Mid.ToString(sb);
        }
        if (__isset.direction)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Direction: ");
            Direction.ToString(sb);
        }
        if (__isset.method)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Method: ");
            Method.ToString(sb);
        }
        if (Param != null && __isset.param)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Param: ");
            Param.ToString(sb);
        }
        if (__isset.timestamp)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Timestamp: ");
            Timestamp.ToString(sb);
        }
        if (__isset.seqId)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("SeqId: ");
            SeqId.ToString(sb);
        }
        if (DisplayName != null && __isset.displayName)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("DisplayName: ");
            DisplayName.ToString(sb);
        }
        if (PicturePath != null && __isset.picturePath)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("PicturePath: ");
            PicturePath.ToString(sb);
        }
        if (PictureStatus != null && __isset.pictureStatus)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("PictureStatus: ");
            PictureStatus.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }