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);
 }
Example #3
0
 public static TTask CreateRuntimeTask <TTask>(this IRuntime runtime) where TTask : IRuntimeTask
 {
     return(runtime.CreateRuntimeTask <TTask>(ObjectInitializer.Default.Name, ScopeContext.GetDefaultScope()));
 }
Example #4
0
 public static TTask CreateRuntimeTask <TTask>(this IRuntime runtime, string implementationRef) where TTask : IRuntimeTask
 {
     return(runtime.CreateRuntimeTask <TTask>(implementationRef, ScopeContext.GetDefaultScope()));
 }