Ejemplo n.º 1
0
        internal static IServiceContainer <T> GetSecuredService <T>(this IRuntime runtime) where T : class
        {
            var container = runtime.CreateServiceProxy <T>();

            container.Initialize(true);
            return(container);
        }
Ejemplo n.º 2
0
        internal static IServiceContainer <T> GetDelegateService <T>(this IRuntime runtime) where T : class
        {
            var container = runtime.CreateServiceProxy <T>();

            container.Initialize(runtime.GetBootstrapContext());
            return(container);
        }
Ejemplo n.º 3
0
        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);
        }