Exemplo n.º 1
0
        private ConstructorBuilderInfo CreateInternalClassCtor(DeclarationClass n, string name)
        {
            _currentType        = name;
            _currentTypeBuilder = _typeManager.GetBuilderInfo(n.Name);

            var method = new DeclarationMethod(name, n.Statements)
            {
                Type       = new TypeFunction(true),
                Descriptor = new MethodDescriptor(n.Type, name, n.Descriptor)
            };

            _typeManager.AddCtor(name, method);
            return(_currentTypeBuilder.ConstructorBuilder);
        }
Exemplo n.º 2
0
        //this is a special case since it will be the entry point..
        private MethodBuilderInfo CreateEntryPointMethod(DeclarationClass n, string name)
        {
            _currentType        = name;
            _currentTypeBuilder = _typeManager.GetBuilderInfo(n.Name);

            var method = new DeclarationMethod(name, n.Statements)
            {
                Type       = new TypeFunction(true),
                Descriptor = new MethodDescriptor(n.Type, name, n.Descriptor)
            };

            _typeManager.AddMethod(name, method);

            return(_typeManager.GetMethodBuilderInfo(_currentType, n.Name));
        }
 private void SetCurrentType(string name)
 {
     _currentType = name;
     _currentTypeBuilder = _typeManager.GetBuilderInfo(name);
 }
 private bool IsSubClass(TypeBuilderInfo b)
 {
     return new[] { "CollateralItem", "Bond", "InterestRules","PrincipalRules" }.Contains(b.Name);
 }
        private ConstructorBuilderInfo CreateInternalClassCtor(DeclarationClass n, string name)
        {
            _currentType = name;
            _currentTypeBuilder = _typeManager.GetBuilderInfo(n.Name);

            var method = new DeclarationMethod(name, n.Statements)
                             {
                                 Type = new TypeFunction(true),
                                 Descriptor = new MethodDescriptor(n.Type, name, n.Descriptor)
                             };

            _typeManager.AddCtor(name, method);
            return _currentTypeBuilder.ConstructorBuilder;
        }
        //this is a special case since it will be the entry point..
        private MethodBuilderInfo CreateEntryPointMethod(DeclarationClass n, string name)
        {
            _currentType = name;
            _currentTypeBuilder = _typeManager.GetBuilderInfo(n.Name);

            var method = new DeclarationMethod(name, n.Statements)
                             {
                                 Type = new TypeFunction(true),
                                 Descriptor = new MethodDescriptor(n.Type, name, n.Descriptor)
                             };

            _typeManager.AddMethod(name, method);

            return _typeManager.GetMethodBuilderInfo(_currentType, n.Name);
        }
Exemplo n.º 7
0
 private bool IsSubClass(TypeBuilderInfo b)
 {
     return(new[] { "CollateralItem", "Bond", "InterestRules", "PrincipalRules" }.Contains(b.Name));
 }
Exemplo n.º 8
0
 private void SetCurrentType(string name)
 {
     _currentType        = name;
     _currentTypeBuilder = _typeManager.GetBuilderInfo(name);
 }