Esempio n. 1
0
		public Entry(ProjectItem configurationItem, Configuration configuration)
		{
			if (configurationItem == null)
				throw new ArgumentNullException("configurationItem");
			if (configuration == null)
				throw new ArgumentNullException("configuration");

			ConfigurationItem = configurationItem;
			Configuration = configuration;
		}
Esempio n. 2
0
		public void Add(ProjectItem configurationItem, Configuration configuration)
		{
			if (configurationItem == null)
				throw new ArgumentNullException("configurationItem");
			if (configuration == null)
				throw new ArgumentNullException("configuration");

			var project = configurationItem.ContainingProject;
			var entry = new Entry(configurationItem, configuration);

			_configurations.Add(project, entry);
		}
Esempio n. 3
0
		public bool TryGet(Project project, out Configuration configuration)
		{
			if (project == null)
				throw new ArgumentNullException("project");

			Entry entry;
			if (_configurations.TryGetValue(project, out entry))
			{
				configuration = entry.Configuration;
				return true;
			}

			configuration = null;
			return false;
		}
Esempio n. 4
0
		public bool TryGet(ProjectItem configurationItem, out Configuration configuration)
		{
			if (configurationItem == null)
				throw new ArgumentNullException("configurationItem");

			var project = configurationItem.ContainingProject;

			Entry entry;
			if (_configurations.TryGetValue(project, out entry))
			{
				if (entry.ConfigurationItem == configurationItem)
				{
					configuration = entry.Configuration;
					return true;
				}
			}

			configuration = null;
			return false;
		}