示例#1
0
        private void GenerateCustomLibrary()
        {
            // Visit the name scopes in the runtime.
            NameScopeGenerator extensionScope = null, globalScope = null;

            if (this.Parameters.ExtensionScopeInitializer == null)
            {
                extensionScope = new NameScopeGenerator(this, "ExtensionScope", true);
                this.Parameters.Runtime.ExtensionScope.Accept(extensionScope);
            }
            globalScope = new NameScopeGenerator(this, "GlobalScope", false);
            this.Parameters.Runtime.GlobalScope.Accept(globalScope);

            // Generate types from the result of the name scope visiting
            MethodInfo extensionScopeInitializer, globalScopeInitializer;

            if (this.Parameters.ExtensionScopeInitializer == null)
            {
                extensionScopeInitializer = extensionScope.GenerateNameScopeInitializerMethod();
            }
            else
            {
                extensionScopeInitializer = this.Parameters.ExtensionScopeInitializer;
            }
            globalScopeInitializer = globalScope.GenerateNameScopeInitializerMethod();
            // Generate the entry point class, the one that creates the new Smalltalk runtime.
            RuntimeGenerator runtime = new RuntimeGenerator(this, extensionScopeInitializer, globalScopeInitializer);

            runtime.GenerateCreateRuntimeMethods();
        }
示例#2
0
	/**
	 * Builds an instance of a web service stub, using the
	 * {@link RuntimeGenerator} provided
	 * @param gen
	 */
	 
	public Stub(RuntimeGenerator gen, string configuration) : base()
	{
	    m_generator = gen;
	    readConfiguration(configuration);
	    m_generator.reset();
	}