Skip to content

access

import { access } from "@alloy-js/csharp";
function access(base: Refkeyable | string, options?: AccessExpressionPartProps): AccessExpressionBuilder;
baseRefkeyable | string
optionsoptional AccessExpressionPartProps
argsoptional boolean | Children[]Emit a function call.
attributeoptional booleanWether this part is an attribute reference (used in an attribute context). In that case the “Attribute” suffix is trimmed from the name if present.
childrenoptionalChildren
conditionaloptional booleanWhether this part should use conditional access.
idoptional stringThe identifier to use for this part.
indexoptionalChildrenCreate an element access part with a single indexer argument. Mutually exclusive with the indexerArgs prop.
indexerArgsoptionalChildren[]Create an element access part with multiple indexer arguments. Mutually exclusive with the index prop.
nullableoptional booleanWhether this part could possibly be null. Will guard member and element access with a conditional access operator. Passing this is not necessary if you provide a symbol or refkey and the symbol’s nullable flag is set.
refkeyoptionalRefkeyableA refkey for the symbol whose name becomes this part’s identifier. When a refkey is provided for the first part, it will be fully resolved. Otherwise, just the symbol’s name is used.
symboloptionalCSharpSymbolThe symbol whose name becomes this part’s identifier.
typeArgsoptionalChildren[]Type arguments to pass to a member access.
AccessExpressionBuilder