public static GoogleApiConfig Configure(Func <GoogleApiConfig, GoogleApiConfig> config) { GoogleApiConfig c = new GoogleApiConfig(); c = config(c); ServicesContainer.AddSingleton <GoogleApiConfig>(c); return(c); }
/// <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); }
public static MySQLServiceDBConfiguration SetConnectionString(string ConnectionString) { var value = new MySQLServiceDBConfiguration(); value.ConnectionString = ConnectionString; ServicesContainer.AddSingleton <MySQLServiceDBConfiguration>(value); ServicesContainer.AddTransient <MySQLService>(); return(value); }
/// <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); }
public static void Configure() { ServicesContainer.AddSingleton <IHttpContextAccessor, HttpContextAccessor>(); }