-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2eff34d
commit 2215c3b
Showing
4 changed files
with
37 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Infrastructure | ||
{ | ||
/// <summary> | ||
/// Characteristics of a given EF service. | ||
/// </summary> | ||
public readonly struct ServiceCharacteristics | ||
{ | ||
/// <summary> | ||
/// Creates a new <see cref="ServiceCharacteristics" /> struct. | ||
/// </summary> | ||
/// <param name="lifetime"> The service lifetime. </param> | ||
/// <param name="multipleRegistrations"> True if multiple registrations of the service is allowed; false otherwise. </param> | ||
public ServiceCharacteristics(ServiceLifetime lifetime, bool multipleRegistrations = false) | ||
{ | ||
Lifetime = lifetime; | ||
MultipleRegistrations = multipleRegistrations; | ||
} | ||
|
||
/// <summary> | ||
/// The service lifetime. | ||
/// </summary> | ||
public ServiceLifetime Lifetime { get; } | ||
|
||
/// <summary> | ||
/// True if multiple registrations of the service is allowed; false otherwise. | ||
/// </summary> | ||
public bool MultipleRegistrations { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters