Exemple #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);
        }
Exemple #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);
        }
Exemple #7
0
 private bool IsSubClass(TypeBuilderInfo b)
 {
     return(new[] { "CollateralItem", "Bond", "InterestRules", "PrincipalRules" }.Contains(b.Name));
 }
Exemple #8
0
 private void SetCurrentType(string name)
 {
     _currentType        = name;
     _currentTypeBuilder = _typeManager.GetBuilderInfo(name);
 }