コード例 #1
0
ファイル: AggregateProjectEntry.cs プロジェクト: RussBaz/PTVS
        internal static IVersioned GetAggregate(IVersioned from, ProjectEntry with) {
            if (from == with) {
                // No aggregation
                return from;
            }

            if (from is AggregateProjectEntry) {
                // We can use our fast check to see if we're already in the aggregate
                // or if we have a known transition.
                return ((AggregateProjectEntry)from).AggregateWith(with);
            }

            // We're aggregating two random project entries.
            Debug.Assert(from is IProjectEntry);
            return with.ProjectState.GetAggregate((IProjectEntry)from, with);
        }
コード例 #2
0
ファイル: AggregateProjectEntry.cs プロジェクト: RussBaz/PTVS
        internal AggregateProjectEntry AggregateWith(ProjectEntry with) {
            if (_aggregating.Contains(with)) {
                // we're not adding any new types
                return this;
            }

            if (_next == null) {
                _next = new Dictionary<IProjectEntry, AggregateProjectEntry>();
            }

            AggregateProjectEntry entry;
            if (!_next.TryGetValue(with, out entry)) {
                // We don't yet have the next transition, create it now.
                _next[with] = entry = with.ProjectState.GetAggregate(_aggregating, with);
            }

            return entry;
        }
コード例 #3
0
        internal static IVersioned GetAggregate(IVersioned from, ProjectEntry with)
        {
            if (from == with)
            {
                // No aggregation
                return(from);
            }

            if (from is AggregateProjectEntry)
            {
                // We can use our fast check to see if we're already in the aggregate
                // or if we have a known transition.
                return(((AggregateProjectEntry)from).AggregateWith(with));
            }

            // We're aggregating two random project entries.
            Debug.Assert(from is IProjectEntry);
            return(with.ProjectState.GetAggregate((IProjectEntry)from, with));
        }
コード例 #4
0
        internal AggregateProjectEntry AggregateWith(ProjectEntry with)
        {
            if (_aggregating.Contains(with))
            {
                // we're not adding any new types
                return(this);
            }

            if (_next == null)
            {
                _next = new Dictionary <IProjectEntry, AggregateProjectEntry>();
            }

            AggregateProjectEntry entry;

            if (!_next.TryGetValue(with, out entry))
            {
                // We don't yet have the next transition, create it now.
                _next[with] = entry = with.ProjectState.GetAggregate(_aggregating, with);
            }

            return(entry);
        }
コード例 #5
0
 internal bool IsVisible(ProjectEntry assigningScope)
 {
     return true;
 }
コード例 #6
0
 internal bool IsVisible(ProjectEntry assigningScope)
 {
     return(true);
 }
コード例 #7
0
ファイル: VariableDef.cs プロジェクト: raajsurvade/PTVS
 public LocatedVariableDef(ProjectEntry entry, Node location)
 {
     _entry            = entry;
     _location         = location;
     _declaringVersion = entry.AnalysisVersion;
 }
コード例 #8
0
 internal bool IsVisible(ProjectEntry assigningScope) => true;
コード例 #9
0
 public ActivePythonParse(ProjectEntry entry, long expectedVersion)
 {
     _entry           = entry;
     _expectedVersion = expectedVersion;
 }
コード例 #10
0
 public ActivePythonParse(ProjectEntry entry, long expected)
 {
     _entry    = entry;
     _expected = expected;
 }
コード例 #11
0
ファイル: VariableDef.cs プロジェクト: szh2bg/PTVS
 public LocatedVariableDef(ProjectEntry entry, EncodedLocation location)
 {
     Entry            = entry;
     Location         = location;
     DeclaringVersion = entry.AnalysisVersion;
 }
コード例 #12
0
 public XamlProjectEntry(string filename)
 {
     FilePath    = filename;
     DocumentUri = ProjectEntry.MakeDocumentUri(FilePath);
 }
コード例 #13
0
ファイル: LocationInfo.cs プロジェクト: zuokaihuang/PTVS
 public override int GetHashCode()
 {
     return(Line.GetHashCode() ^ ProjectEntry.GetHashCode());
 }