예제 #1
0
        /// <summary>
        /// Configures the assembler using resource XML files in the specified assembly
        /// </summary>
        /// <param name="asm">Assembly containing mapping xml files as resuorces</param>
        /// <param name="suffix">Suffix of the files. only files whose name ends with the specified suffix will be processed.</param>
        public void AddAssemblyResources(Assembly asm, string suffix)
        {
            IMappingDescriptorProvider provider = ProviderFactory.FromAssemblyResources(asm, suffix);

            AddProvider(provider);
        }
예제 #2
0
        /// <summary>
        /// Configures the assembler using metadata of types in the specified assembly
        /// </summary>
        /// <param name="asm">Assembly containing types which act as targets of transformation</param>
        public void AddAssembly(Assembly asm)
        {
            IMappingDescriptorProvider provider = ProviderFactory.FromAssembly(asm);

            AddProvider(provider);
        }
예제 #3
0
        /// <summary>
        /// Configures the assembler using mapping info from XML file. File structure must conform
        /// to Otis schema.
        /// </summary>
        /// <param name="filename">name of the XML file containing mapping definitions</param>
        public void AddXmlFile(string filename)
        {
            IMappingDescriptorProvider provider = ProviderFactory.FromXmlFile(filename);

            AddProvider(provider);
        }
예제 #4
0
        /// <summary>
        /// Configures the assembler using mapping info from string containing XML mapping definition.
        /// XML structure must conform to Otis schema.
        /// </summary>
        /// <param name="data">XML string</param>
        public void AddXmlString(string data)
        {
            IMappingDescriptorProvider provider = ProviderFactory.FromXmlString(data);

            AddProvider(provider);
        }
예제 #5
0
        /// <summary>
        /// Configures the assembler using metadata of the specified type
        /// </summary>
        /// <param name="type">type which acts as targets of transformation</param>
        public void AddType(Type type)
        {
            IMappingDescriptorProvider provider = ProviderFactory.FromType(type);

            AddProvider(provider);
        }