Example #1
0
        protected override Subroutine BuildNewSubroutine(Method method)
        {
            if (ContractProvider != null)
            {
                IImmutableSet <Subroutine> inheritedRequires = GetInheritedRequires(method);
                if (ContractProvider.HasRequires(method))
                {
                    return(ContractProvider.AccessRequires(method, this, new Pair <Method, IImmutableSet <Subroutine> > (method, inheritedRequires)));
                }
                if (inheritedRequires.Count > 0)
                {
                    if (inheritedRequires.Count == 1)
                    {
                        return(inheritedRequires.Any);
                    }

                    return(new RequiresSubroutine <Dummy> (this.SubroutineFacade, method, inheritedRequires));
                }
            }
            return(null);
        }