Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-273441: Incorrect 'Expression is always true' inside lambda which is created under certain conditions

$
0
0
Reporter Andrew Serebryansky (andrew.serebryansky) Andrew Serebryansky (andrew.serebryansky)
Created Jun 29, 2011 2:31:32 PM
Updated Jan 20, 2012 7:11:55 PM
Resolved Jan 20, 2012 5:36:20 PM
Priority Critical
Type Bug
Fix versions Next
State Fixed
Assignee Evgeny Pasynkov (pasynkov)
Subsystem No subsystem
Affected versions 6.0 EAP
Fixed in build 6.5.1.2889

	class Program {
		static void Main(string[] args) {
		}

		private Assembly ApplicationAssembly {
			get;
			set;
		}

		private FileSystemWatcher appUpdateWatcher;

		private EventHandler applicationUpdated;
		public event EventHandler ApplicationUpdated {
			add {
				applicationUpdated = (EventHandler)Delegate.Combine(applicationUpdated, value);
				UpdateAppUpdateWatcher();
			}
			remove {
				applicationUpdated = (EventHandler)Delegate.Remove(applicationUpdated, value);
			}
		}

		private void UpdateAppUpdateWatcher() {
			if(applicationUpdated != null && appUpdateWatcher == null && ApplicationAssembly != null) {
				appUpdateWatcher = new FileSystemWatcher(Path.GetDirectoryName(ApplicationAssembly.Location), "*.exe");
				appUpdateWatcher.Renamed += (o, args) => {
					var handler = applicationUpdated;
					if(handler != null)
						handler(this, EventArgs.Empty);
				};
			}
		}
	}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>