private static string GetName(MissingInfo item) { var memberInfo = item as MissingMemberInfo; var typeInfo = item as MissingTypeInfo; if (memberInfo != null) { return memberInfo.MemberName; } else if (typeInfo != null) { return typeInfo.TypeName; } else { Debug.Assert(true, "Unknown MissingInfo type"); return string.Empty; } }
public override bool Equals(object obj) { MissingInfo other = obj as MissingInfo; return(other != null && StringComparer.Ordinal.Equals(other.DocId, DocId)); }
private ISourceMappedItem GetSourceMappedItem(IPrimarySourceLocation location, MissingInfo memberInfo) { var unsupportedPlatformNames = GetUnsupportedPlatformNames(GetTargetStatus(memberInfo)); return new CciSourceItem(location, memberInfo, unsupportedPlatformNames); }
public CciSourceItem(IPrimarySourceLocation location, MissingInfo item, IEnumerable<FrameworkName> unsupportedPlatformNames) { _column = location.StartColumn; _line = location.StartLine; _path = location.SourceDocument.Location; _item = item; _unsupportedPlatforms = unsupportedPlatformNames; }
private IEnumerable<Version> GetTargetStatus(MissingInfo missingInfo) { var memberInfo = missingInfo as MissingMemberInfo; var typeInfo = missingInfo as MissingTypeInfo; if (memberInfo != null) { return memberInfo.TargetVersionStatus; } else if (typeInfo != null) { return typeInfo.TargetVersionStatus; } else { Debug.Assert(true, "Unknown MissingInfo type"); return new List<Version>(); } }