Ejemplo n.º 1
0
		public bool TryGet(ProjectItem item, out Entry entry)
		{
			if (item == null)
				throw new ArgumentNullException("item");

			var project = item.ContainingProject;

			Dictionary<ProjectItem, Entry> items;
			if (_entries.TryGetValue(project, out items))
			{
				return items.TryGetValue(item, out entry);
			}

			entry = null;
			return false;
		}
Ejemplo n.º 2
0
		public void Add(ProjectItem item, EventModel model, IEnumerable<IEventScript> scripts, ResolveEventHandler resolver)
		{
			if (item == null)
				throw new ArgumentNullException("item");

			var entry = new Entry(item, model, scripts, resolver);

			var project = item.ContainingProject;
	
			Dictionary<ProjectItem, Entry> items;
			if (!_entries.TryGetValue(project, out items))
			{
				// Add project entry
				items = new Dictionary<ProjectItem, Entry>();
				_entries.Add(project, items);
			}

			items.Add(item, entry);
		}