-
-
Save tuannguyenssu/0e85bbc292e97a26cdbd9f2d65c484e1 to your computer and use it in GitHub Desktop.
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
using System; | |
namespace DependencyInjectionLifeTimeTest | |
{ | |
public interface ITransientService | |
{ | |
Guid GetID(); | |
} | |
public interface IScopedService | |
{ | |
Guid GetID(); | |
} | |
public interface ISingletonService | |
{ | |
Guid GetID(); | |
} | |
public class SomeService : ITransientService, IScopedService, ISingletonService | |
{ | |
Guid id; | |
public SomeService() | |
{ | |
id = Guid.NewGuid(); | |
} | |
public Guid GetID() | |
{ | |
return id; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment