Пример #1
0
            private bool GenerateInterface(TService service)
            {
                if (!IsAttribute &&
                    !IsException &&
                    Name.LooksLikeInterfaceName() &&
                    ObjectCreationExpressionOpt == null &&
                    (BaseTypeOrInterfaceOpt == null || BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface))
                {
                    return(true);
                }

                return(service.IsInInterfaceList(NameOrMemberAccessExpression));
            }
Пример #2
0
            private bool GenerateInterface(
                TService service,
                CancellationToken cancellationToken)
            {
                if (!this.IsAttribute &&
                    !this.IsException &&
                    this.Name.LooksLikeInterfaceName() &&
                    this.ObjectCreationExpressionOpt == null &&
                    (this.BaseTypeOrInterfaceOpt == null || this.BaseTypeOrInterfaceOpt.TypeKind == TypeKind.Interface))
                {
                    return(true);
                }

                return(service.IsInInterfaceList(this.NameOrMemberAccessExpression));
            }