public override int GetHashCode() { unchecked { int hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (Cref != null ? Cref.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PropertyName != null ? PropertyName.GetHashCode() : 0); return(hashCode); } }
/// <summary> /// 初始化一个<see cref="CsCommentsException"/>类型的实例 /// </summary> /// <param name="index">节点在文档中的索引</param> /// <param name="node">Xml节点</param> internal CsCommentsException(int index, XmlNode node) { Index = index; var attr = node.Attributes["cref"]; if (attr != null) { Cref = attr.InnerText; Cref = Cref?.Remove(0, 2); } Text = node.InnerText.Trim(); }
bool AppendParameterIndex(CodeTypeReference p) { var dt = declType.TypeParameters.Cast <CodeTypeParameter>().FirstOrDefault(e => e.Name == p.BaseType); if (dt != null) { Cref.Append("`").Append(declType.TypeParameters.IndexOf(dt)); return(true); } dt = method.TypeParameters.Cast <CodeTypeParameter>().FirstOrDefault(e => e.Name == p.BaseType); if (dt != null) { Cref.Append("``").Append(method.TypeParameters.IndexOf(dt)); return(true); } return(false); }
public override string ToString() => Cref.ToString();
public override int GetHashCode() => Cref.GetHashCode();