Esempio n. 1
0
 public static EntryLinkNode EntryLink(SelectionEntryNode selectionEntry, string id = null)
 {
     return(EntryLink(
                selectionEntryBase: selectionEntry,
                type: EntryLinkKind.SelectionEntry,
                id: id));
 }
Esempio n. 2
0
 public static ISelectionEntryContainerSymbol CreateEntry(
     ISymbol containingSymbol,
     SelectionEntryNode node,
     DiagnosticBag diagnostics)
 {
     return(new SelectionEntrySymbol(containingSymbol, node, diagnostics));
 }
Esempio n. 3
0
    protected ContainerEntryBaseSymbol(
        ISymbol containingSymbol,
        ContainerEntryBaseNode declaration,
        DiagnosticBag diagnostics)
        : base(containingSymbol, declaration, diagnostics)
    {
        Constraints = ImmutableArray <IConstraintSymbol> .Empty; // TODO map
        Resources   = CreateResourceEntries().ToImmutableArray();

        IEnumerable <IResourceEntrySymbol> CreateResourceEntries()
        {
            var costs = declaration switch
            {
                SelectionEntryNode entry => entry.Costs.NodeList,
                EntryLinkNode link => link.Costs.NodeList,
                _ => default,