public LanguageExpression GetModuleResourceIdExpression(ModuleSymbol moduleSymbol) { return(ScopeHelper.FormatCrossScopeResourceId( this, context.ModuleScopeData[moduleSymbol], TemplateWriter.NestedDeploymentResourceType, GetModuleNameExpression(moduleSymbol).AsEnumerable())); }
private LanguageExpression GenerateScopedResourceId(ResourceSymbol resourceSymbol, ResourceScope?targetScope) { var typeReference = EmitHelpers.GetTypeReference(resourceSymbol); var nameSegments = GetResourceNameSegments(resourceSymbol, typeReference); if (!context.ResourceScopeData.TryGetValue(resourceSymbol, out var scopeData)) { return(ScopeHelper.FormatLocallyScopedResourceId(targetScope, typeReference.FullyQualifiedType, nameSegments)); } return(ScopeHelper.FormatCrossScopeResourceId(this, scopeData, typeReference.FullyQualifiedType, nameSegments)); }