Esempio n. 1
0
        /// <summary>
        /// 确定指定的对象是否等于当前对象
        /// </summary>
        /// <param name="obj">要与当前对象进行比较的对象</param>
        /// <returns>
        /// 如果指定的对象等于当前对象,则为
        /// <code>true</code>
        /// ,否则为
        /// <code>false</code>
        /// </returns>
        public override bool Equals(object obj)
        {
            OPQCode code = obj as OPQCode;

            if (code != null)
            {
                return(string.Equals(this._originalString, code._originalString));
            }
            return(base.Equals(obj));
        }
Esempio n. 2
0
 /// <summary>
 /// 解析文本中的OPQ码
 /// </summary>
 /// <param name="raw"></param>
 /// <returns></returns>
 public static List <OPQCode> ParseOPQCode(this string raw)
 {
     return(OPQCode.Parse(raw));
 }
Esempio n. 3
0
 /// <summary>
 /// 判断是否是图片 <see cref="OPQCode"/>
 /// </summary>
 /// <param name="code">要判断的 <see cref="OPQCode"/> 实例</param>
 /// <returns>如果是图片 <see cref="OPQCode"/> 返回 <see langword="true"/> 否则返回 <see langword="false"/></returns>
 public static bool EqualIsImageOPQCode(OPQCode code)
 {
     return(code.Function == OPQFunction.Pic);
 }