Skip to content

Commit

Permalink
Update ControlTemplate to indicate whether it's a Component or Pcf …
Browse files Browse the repository at this point in the history
…control template (#631)
  • Loading branch information
joem-msft authored Apr 10, 2024
1 parent de5d225 commit 368eb14
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/Persistence/Templates/ControlTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,29 @@ public string DisplayName
public ControlPropertiesCollection InputProperties { get; init; } = new();

public IList<ControlTemplate>? NestedTemplates { get; init; }

public CustomComponentInfo? ComponentInfo { get; init; }

[MemberNotNullWhen(true, nameof(ComponentInfo))]
public bool IsCustomComponent => ComponentInfo != null;

public bool IsPcfControlTemplate { get; init; }

public class CustomComponentInfo
{
/// <summary>
/// The unique id (a form of guid) of the component as serialized in the app.
/// </summary>
public required string UniqueId { get; init; }

/// <summary>
/// The friendly identifier of the component.
/// </summary>
public required string Name { get; init; }

/// <summary>
/// The unique name of the component library if this component originates from a component library.
/// </summary>
public string? ComponentLibraryUniqueName { get; init; }
}
}

0 comments on commit 368eb14

Please sign in to comment.