Ejemplo n.º 1
0
        public static MemberDecoration GetDecoration(INestedTypeUnionCaseDeclaration caseDeclaration)
        {
            if (caseDeclaration.FieldsEnumerable.IsEmpty())
            {
                return(MemberDecoration.FromModifiers(Modifiers.INTERNAL));
            }

            return(caseDeclaration.GetContainingTypeDeclaration() is IUnionDeclaration unionDeclaration
        ? GetDecoration(unionDeclaration.AccessModifiers, TreeNodeEnumerable <IFSharpAttribute> .Empty)
        : MemberDecoration.DefaultValue);
        }
Ejemplo n.º 2
0
        public static MemberDecoration GetDecoration(IUnionCaseDeclaration caseDeclaration)
        {
            if (caseDeclaration.FieldsEnumerable.IsEmpty())
            {
                return(MemberDecoration.FromModifiers(Modifiers.INTERNAL));
            }

            return(UnionRepresentationNavigator.GetByUnionCase(caseDeclaration) is var repr &&
                   FSharpTypeDeclarationNavigator.GetByTypeRepresentation(repr) is { } decl
        ? GetDecoration(decl.AccessModifier, TreeNodeCollection <IAttribute> .Empty)
        : MemberDecoration.DefaultValue);
        }
Ejemplo n.º 3
0
 public AnonModulePart([NotNull] IAnonModuleDeclaration declaration, [NotNull] ICacheBuilder cacheBuilder)
     : base(declaration, cacheBuilder.Intern(declaration.CompiledName),
            MemberDecoration.FromModifiers(ReSharper.Psi.Modifiers.PUBLIC), cacheBuilder)
 {
 }