예제 #1
0
        public SwiftTranslator(Poco2SwiftType configuration, ITypeFilter filter, DocumentationCache documentation, IAppDomainProxy appDomain)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }

            if (filter == null)
            {
                throw new ArgumentNullException("filter");
            }

            if (documentation == null)
            {
                throw new ArgumentNullException("documentation");
            }

            if (appDomain == null)
            {
                throw new ArgumentNullException("appDomain");
            }

            _configuration = configuration;
            _filter        = filter;
            _documentation = documentation;
            _appDomain     = appDomain;

            InitPredefinedMapTypes();
            InitExternalTypes();
        }
예제 #2
0
        private void Run()
        {
            ReadConfiguration();
            CreateTargetDomain();
            LoadAssemblies();

            _typeFilter    = new DataContractFilter(_configuration);
            _documentation = new DocumentationCache();
            _translator    = new SwiftTranslator(_configuration, _typeFilter, _documentation, _targetDomainProxy);

            ReadTypes();
            TranslateTypes();
            WriteSwiftSource();
        }