コード例 #1
0
        public static GoogleApiConfig Configure(Func <GoogleApiConfig, GoogleApiConfig> config)
        {
            GoogleApiConfig c = new GoogleApiConfig();

            c = config(c);

            ServicesContainer.AddSingleton <GoogleApiConfig>(c);

            return(c);
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        public static void Configure()
        {
            objectpropertySet = new Dictionary <string, Dictionary <string, PropertyInfo> >();

            Type[] types = null;

            types = ClassUtils.getTypes(typeof(Dto <,>));
            setTypes(types);

            ServicesContainer.AddSingleton <Dictionary <string, Dictionary <string, PropertyInfo> > >(objectpropertySet);
        }
コード例 #3
0
        public static MySQLServiceDBConfiguration SetConnectionString(string ConnectionString)
        {
            var value = new MySQLServiceDBConfiguration();

            value.ConnectionString = ConnectionString;

            ServicesContainer.AddSingleton <MySQLServiceDBConfiguration>(value);

            ServicesContainer.AddTransient <MySQLService>();

            return(value);
        }
コード例 #4
0
        /// <summary>
        ///
        /// </summary>
        public static void Configure(
            TimeSpan timeOut,
            Func <object> delegateUsuarioLogueado = null,
            Security.DelegateHasPermission delegateHasPermission = null,
            Type[] excludeControllerSecurity = null,
            string securitySecretKey         = "GeminusQhom-Aplications!#$%&/()=")
        {
            SecurityConfigure sc = new SecurityConfigure();

            sc.TimeOut = timeOut;
            sc.DelegateHasPermission     = delegateHasPermission;
            sc.ExcludeControllerSecurity = excludeControllerSecurity;
            sc.SecuritySecretKey         = securitySecretKey;
            sc.DelegateUsuarioLogueado   = delegateUsuarioLogueado;

            ServicesContainer.AddSingleton <SecurityConfigure>(sc);
        }
コード例 #5
0
ファイル: HttpContext.cs プロジェクト: difros/REPO-ts-day
 public static void Configure()
 {
     ServicesContainer.AddSingleton <IHttpContextAccessor, HttpContextAccessor>();
 }