public void RemoveUDT(UserDefinedType udt) { UDTCompiler udtCompiler = CreateUDTCompiler(); MappingCompiler mappingInputCompiler = new MappingCompiler(udtCompiler); mappingInputCompiler.Scan(s_udimDirectory); MappingCompiler mappingOutputCompiler = new MappingCompiler(udtCompiler); mappingOutputCompiler.Scan(s_udomDirectory); List <DataType> dataTypes = GetEnumeratedReferenceTypes(udt); dataTypes.Reverse(); foreach (DataType type in dataTypes) { foreach (TypeMapping mapping in mappingInputCompiler.GetMappings((UserDefinedType)type)) { RemoveInputMapping(mapping); } foreach (TypeMapping mapping in mappingOutputCompiler.GetMappings((UserDefinedType)type)) { RemoveOutputMapping(mapping); } string categoryPath = Path.Combine(s_udtDirectory, type.Category); string typePath = Path.Combine(categoryPath, type.Identifier + ".ecaidl"); lock (s_udtLock) { File.Delete(typePath); if (!Directory.EnumerateFileSystemEntries(categoryPath).Any()) { Directory.Delete(categoryPath); } } } }
public List <TypeMapping> GetOutputMappings(UserDefinedType udt) { MappingCompiler mappingCompiler = CreateOutputMappingCompiler(); return(mappingCompiler.GetMappings(udt)); }