internal static IServiceContainer <T> GetSecuredService <T>(this IRuntime runtime) where T : class { var container = runtime.CreateServiceProxy <T>(); container.Initialize(true); return(container); }
internal static IServiceContainer <T> GetDelegateService <T>(this IRuntime runtime) where T : class { var container = runtime.CreateServiceProxy <T>(); container.Initialize(runtime.GetBootstrapContext()); return(container); }
protected IServiceContainer <T> GetServiceContainer <T>() where T : class { WriteVerbose(string.Format("Environment: {0}", Runtime.Environment)); var container = Runtime.CreateServiceProxy <T>(); WriteVerbose(string.Format("Service url: {0}", container.GetUrl())); container.Initialize(true); if (UserName.ContainsCharacters() && Password.ContainsCharacters()) { container.SetCredentials(UserName, Password); } return(container); }