Boo.Lang.Compiler.TypeSystem.TypeSystemServices.GetDefaultConstructor C# (CSharp) Method

GetDefaultConstructor() public method

public GetDefaultConstructor ( IType type ) : IConstructor
type IType
return IConstructor
        public IConstructor GetDefaultConstructor(IType type)
        {
            return type.GetConstructors().FirstOrDefault(constructor => 0 == constructor.GetParameters().Length);
        }

Usage Example

Example #1
0
        public Statement CreateSuperConstructorInvocation(IType baseType)
        {
            IConstructor defaultConstructor = _tss.GetDefaultConstructor(baseType);

            Debug.Assert(null != defaultConstructor);
            return(CreateSuperConstructorInvocation(defaultConstructor));
        }
All Usage Examples Of Boo.Lang.Compiler.TypeSystem.TypeSystemServices::GetDefaultConstructor
TypeSystemServices