-
Notifications
You must be signed in to change notification settings - Fork 727
/
IProviderSpecification.cs
41 lines (34 loc) · 1.06 KB
/
IProviderSpecification.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Bicep.Core.Parsing;
using Bicep.Core.Syntax;
namespace Bicep.Core.TypeSystem.Providers;
public interface IProviderSpecification : ISymbolNameSource
{
string NamespaceIdentifier { get; }
string? Version { get; }
}
public record LegacyProviderSpecification(
string NamespaceIdentifier,
string Version,
bool IsValid,
TextSpan Span) : IProviderSpecification;
public record InlinedProviderSpecification(
string NamespaceIdentifier,
string Version,
string UnexpandedArtifactAddress,
bool IsValid,
TextSpan Span) : IProviderSpecification;
public record ConfigurationManagedProviderSpecification(
string NamespaceIdentifier,
bool IsValid,
TextSpan Span) : IProviderSpecification
{
public string? Version => null;
}
public record ProviderSpecificationTrivia(TextSpan Span) : IProviderSpecification
{
public string NamespaceIdentifier => LanguageConstants.ErrorName;
public bool IsValid => false;
public string? Version => null;
}