private static IScopeContextInternal CreateConcreteType <T>(IScopeContextInternal context)
 {
     context =
         new ScopeContext(context.BoundType.MakeConcreteType(typeof(T).GetGenericArguments())).SetScope(
             context.ActivationScope.GetValueOrDefault(ScopeContext.GetDefaultScope()));
     return(context);
 }
 private static IScopeContextInternal CreateConcreteType(IScopeContextInternal context, Type serviceType)
 {
     context =
         new ScopeContext(context.BoundType.MakeConcreteType(serviceType.GetGenericArguments()), null).SetScope(
             context.ActivationScope.GetValueOrDefault(ScopeContext.GetDefaultScope()));
     return(context);
 }
Beispiel #3
0
 public static TTask CreateRuntimeTask <TTask>(this IRuntime runtime) where TTask : IRuntimeTask
 {
     return(runtime.CreateRuntimeTask <TTask>(ObjectInitializer.Default.Name, ScopeContext.GetDefaultScope()));
 }
Beispiel #4
0
 public static TTask CreateRuntimeTask <TTask>(this IRuntime runtime, string implementationRef) where TTask : IRuntimeTask
 {
     return(runtime.CreateRuntimeTask <TTask>(implementationRef, ScopeContext.GetDefaultScope()));
 }