public AnalysisProxy WrapAnalysisValue(AnalysisValue value) { var res = new AnalysisProxy(value); _proxies.Add(res); return(res); }
IAnalysisSet IAnalysisSet.Add(AnalysisProxy item, out bool wasChanged) { if (((IAnalysisSet)this).Comparer.Equals(this, item)) { wasChanged = false; return(this); } wasChanged = true; return(new AnalysisSetDetails.AnalysisSetTwoObject(this, item)); }
internal AnalysisValue(ProjectEntry projectEntry) { _proxy = projectEntry.WrapAnalysisValue(this); }
bool IAnalysisSet.Contains(AnalysisProxy item) { return(((IAnalysisSet)this).Comparer.Equals(this, item)); }
/// <summary> /// Returns a set containing only <paramref name="ns" />. This is /// exactly equivalent to casting <paramref name="ns" /> to <see /// cref="IAnalysisSet" />. /// </summary> /// <param name="ns">The namespace to contain in the set.</param> public static IAnalysisSet Create(AnalysisProxy ns) { return(ns); }
public static IAnalysisSet Add(this IAnalysisSet set, AnalysisProxy item) { bool dummy; return(set.Add(item, out dummy)); }
/// <summary> /// Returns a set containing only <paramref name="ns" /> that uses the /// specified <see cref="UnionComparer" />. /// /// This is different to casting from <see cref="AnalysisProxy" /> to <see /// cref="IAnalysisSet" />, because the implementation in <see /// cref="AnalysisProxy" /> always uses <see cref="ObjectComparer" />. /// </summary> /// <param name="ns">The namespace to contain in the set.</param> /// <param name="comparer">The comparer to use for the set.</param> internal static IAnalysisSet CreateUnion(AnalysisProxy ns, UnionComparer comparer) { return(new AnalysisSetDetails.AnalysisSetOneUnion(ns, comparer)); }