Ejemplo n.º 1
0
		private static IMappingsReader GetMappingsReader()
		{
			ConfigurationSettings settings = ConfigurationSettings.Settings;
			MappingsFileSource location = settings.MappingsFileSource;

			IMappingsReader reader;
			switch (location)
			{
				case MappingsFileSource.Assembly:
					reader = new AssemblyMappingsReader();
					break;
				case MappingsFileSource.FileSystem:
					reader = new FileSystemMappingsReader();
					break;
				default:
					throw new ConfigurationErrorsException("Specified Mappings File Source in configuration file is unknown or invalid.");
			}

			return reader;
		}
Ejemplo n.º 2
0
		public void GetAssemblyMappings()
		{
			IMappingsReader reader = new AssemblyMappingsReader();
			reader.GetMappingsFile("Mappings.config", "WilsonORWrapper.Tests.dll");
		}