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); }
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); }
public AnonModulePart([NotNull] IAnonModuleDeclaration declaration, [NotNull] ICacheBuilder cacheBuilder) : base(declaration, cacheBuilder.Intern(declaration.CompiledName), MemberDecoration.FromModifiers(ReSharper.Psi.Modifiers.PUBLIC), cacheBuilder) { }