Ejemplo n.º 1
0
        public ISolutionSnapshotWithProjectMapping GetCurrentSolutionSnapshot()
        {
            var weakRef = currentSolutionSnapshot;
            SharpDevelopSolutionSnapshot result;

            if (weakRef == null || !weakRef.TryGetTarget(out result))
            {
                // create new snapshot if we don't have one cached
                var solution = ProjectService.OpenSolution;
                result = new SharpDevelopSolutionSnapshot(solution != null ? solution.Projects : null);
                currentSolutionSnapshot = new WeakReference <SharpDevelopSolutionSnapshot>(result);
            }
            return(result);
        }
Ejemplo n.º 2
0
		public ISolutionSnapshotWithProjectMapping GetCurrentSolutionSnapshot()
		{
			var weakRef = currentSolutionSnapshot;
			SharpDevelopSolutionSnapshot result;
			if (weakRef == null || !weakRef.TryGetTarget(out result)) {
				// create new snapshot if we don't have one cached
				var solution = ProjectService.OpenSolution;
				result = new SharpDevelopSolutionSnapshot(solution != null ? solution.Projects : null);
				currentSolutionSnapshot = new WeakReference<SharpDevelopSolutionSnapshot>(result);
			}
			return result;
		}