예제 #1
0
        public void Resolve_PassNothing_ReturnAssemblyNameDefinition()
        {
            var nameResolver    = new CoreAssemblyNameResolver();
            var assemblyNameDef = nameResolver.Resolve(null);

            Assert.IsNotNull(assemblyNameDef);
            Assert.AreEqual("PapyrusDotNet.Core", assemblyNameDef.Name);
            Assert.AreEqual("PapyrusDotNet.Core", nameResolver.BaseNamespace);
            Assert.AreEqual("PapyrusDotNet.Core.dll", nameResolver.OutputLibraryFilename);
        }
예제 #2
0
        public PapyrusCilAssemblyBuilder()
        {
            AssemblyNameResolver = new CoreAssemblyNameResolver();

            var statusCallBack    = new ConsoleStatusCallbackService();
            var nameResolver      = new DictionaryPapyrusNameResolver(statusCallBack);
            var namespaceResolver = new PapyrusNamespaceResolver(AssemblyNameResolver);
            var typeNameResolver  = new PapyrusTypeNameResolver();

            PapyrusScriptParser   = new PapyrusScriptParser(nameResolver);
            PapyrusAssemblyParser = new PapyrusAssemblyParser(nameResolver);

            TypeReferenceResolver  = new PapyrusTypeReferenceResolver(namespaceResolver, typeNameResolver);
            TypeDefinitionResolver = new PapyrusTypeDefinitionResolver(AssemblyNameResolver, TypeReferenceResolver,
                                                                       statusCallBack);

            TypeDefinitionResolver.Initialize(this);
            TypeReferenceResolver.Initialize(this);
        }