ow
This commit is contained in:
1 parent
fcbeba7287
commit
f2f5807372
33 files changed
+1399
-1444
No files matched your search
@@ -87,17 +87,17 @@ namespace CloudBuilder.Core.Application.Builders
|
||||
return this;
|
||||
}
|
||||
|
||||
public T GetTransientService<T>()
|
||||
{
|
||||
object? t = Services.BuildServiceProvider().GetService(typeof(T));
|
||||
if (t == null) return default(T)!;
|
||||
return (T)t;
|
||||
}
|
||||
//public T GetTransientService<T>()
|
||||
//{
|
||||
// object? t = Services.BuildServiceProvider().GetService(typeof(T));
|
||||
// if (t == null) return default(T)!;
|
||||
// return (T)t;
|
||||
//}
|
||||
|
||||
public T GetTransientRequiredService<T>()
|
||||
{
|
||||
return (T)Services.BuildServiceProvider().GetRequiredService(typeof(T));
|
||||
}
|
||||
//public T GetTransientRequiredService<T>()
|
||||
//{
|
||||
// return (T)Services.BuildServiceProvider().GetRequiredService(typeof(T));
|
||||
//}
|
||||
|
||||
public static Assembly[] GetAssemblies()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user