GetDefaultConstructor() public method

public GetDefaultConstructor ( IType type ) : IConstructor
type IType
return IConstructor
Ejemplo n.º 1
0
        public Statement CreateSuperConstructorInvocation(IType baseType)
        {
            IConstructor defaultConstructor = _tss.GetDefaultConstructor(baseType);

            Debug.Assert(null != defaultConstructor);
            return(CreateSuperConstructorInvocation(defaultConstructor));
        }
Ejemplo n.º 2
0
        private IConstructor DefaultConstructorFor(IType baseType)
        {
            IConstructor defaultConstructor = TypeSystemServices.GetDefaultConstructor(baseType);

            if (null == defaultConstructor)
            {
                throw new ArgumentException("No default constructor for type '" + baseType + "'.");
            }
            return(defaultConstructor);
        }
Ejemplo n.º 3
0
 public Attribute CreateAttribute(IType type)
 {
     // TODO: check for the existence of a default constructor
     return(CreateAttribute(_tss.GetDefaultConstructor(type)));
 }