Boo.Lang.Compiler.TypeSystem.BooClassBuilder.AddReadOnlyProperty C# (CSharp) Method

AddReadOnlyProperty() public method

public AddReadOnlyProperty ( string name, IType type ) : Property
name string
type IType
return Property
        public Property AddReadOnlyProperty(string name, IType type)
        {
            TypeMemberModifiers modifiers = TypeMemberModifiers.Public;
            Property property = new Property(name);
            property.Modifiers = modifiers;
            property.Type = _codeBuilder.CreateTypeReference(type);
            property.Entity = new InternalProperty(_codeBuilder.TypeSystemServices, property);
            property.Getter = _codeBuilder.CreateMethod("get_" + name, type, modifiers);

            _cd.Members.Add(property);
            return property;
        }