Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions Stellar.SourceGenerators/ServiceRegistrationAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ public class ServiceRegistrationAttribute : Attribute
public Lifetime ServiceRegistrationType { get; set; }

public bool RegisterInterfaces { get; set; }

public Type? ServiceType { get; set; }

public string? Key { get; set; }

public ServiceRegistrationAttribute()
{
ServiceRegistrationType = Lifetime.Transient;
}

public ServiceRegistrationAttribute(Lifetime serviceRegistrationType)
{
ServiceRegistrationType = serviceRegistrationType;
}

public ServiceRegistrationAttribute(Lifetime serviceRegistrationType = Lifetime.Transient, bool registerInterfaces = false)
public ServiceRegistrationAttribute(
Lifetime serviceRegistrationType = Lifetime.Transient,
bool registerInterfaces = false,
Type? serviceType = null,
string? key = null)
{
ServiceRegistrationType = serviceRegistrationType;
RegisterInterfaces = registerInterfaces;
ServiceType = serviceType;
Key = key;
}
}

Expand Down
Loading