internal CommandSwitch(string name, string abbreviation, SwitchType switchType, OperationalContext switchLevel = DefaultSwitchLevel) { // ensure that name doesn't start with the switch indicators. // also convert to lower-case if (name.StartsWith(FullSwitchIndicator)) { this.Name = name.Substring(FullSwitchIndicator.Length); } else { this.Name = name; } if (abbreviation.StartsWith(AbbreviationSwitchIndicator)) { this.Abbreviation = abbreviation.Substring(AbbreviationSwitchIndicator.Length); } else { this.Abbreviation = abbreviation; } this.SwitchType = switchType; this.SwitchLevel = switchLevel; System.Diagnostics.Debug.Assert(!s_allSwitches.Any(s => s.Equals(this)), $"A switch with name or abbreviation '{name}+{abbreviation}' has already been crated!"); s_allSwitches.Add(this); }
public ConsentStore(OperationalContext context) { if (context == null) { throw new ArgumentNullException("context"); } this.context = context; }
public HomeController(ClientConfigurationContext clientContext, ScopeConfigurationContext scopeContext, OperationalContext operationalContext, UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager) { _clientContext = clientContext; _scopeContext = scopeContext; _operationalContext = operationalContext; _userManager = userManager; _roleManager = roleManager; }
// ======================================================================= // ConnectorFacade Interface // ======================================================================= protected override APIOperation GetOperationImplementation(SafeType <APIOperation> api) { APIOperation proxy; //first create the inner proxy - this is the proxy that obtaining //a connection from the pool, etc //NOTE: we want to skip this part of the proxy for //validate op, but we will want the timeout proxy if (api.RawType.Equals(typeof(ValidateApiOp))) { OperationalContext context = new OperationalContext(connectorInfo, GetAPIConfiguration()); proxy = new ValidateImpl(context); } else if (api.RawType.Equals(typeof(GetApiOp))) { ConstructorInfo constructor = API_TO_IMPL[SafeType <APIOperation> .Get <SearchApiOp>()]; ConnectorOperationalContext context = new ConnectorOperationalContext(connectorInfo, GetAPIConfiguration(), GetPool()); ConnectorAPIOperationRunnerProxy handler = new ConnectorAPIOperationRunnerProxy(context, constructor); proxy = new GetImpl((SearchApiOp)NewAPIOperationProxy(SafeType <APIOperation> .Get <SearchApiOp>(), handler)); } else { ConstructorInfo constructor = API_TO_IMPL[api]; ConnectorOperationalContext context = new ConnectorOperationalContext(connectorInfo, GetAPIConfiguration(), GetPool()); ConnectorAPIOperationRunnerProxy handler = new ConnectorAPIOperationRunnerProxy(context, constructor); proxy = NewAPIOperationProxy(api, handler); } //TODO: timeout // add logging proxy.. proxy = CreateLoggingProxy(api, proxy); return(proxy); }
protected BaseTokenStore(OperationalContext context, TokenType tokenType, IScopeStore scopeStore, IClientStore clientStore) { if (context == null) { throw new ArgumentNullException("context"); } if (scopeStore == null) { throw new ArgumentNullException("scopeStore"); } if (clientStore == null) { throw new ArgumentNullException("clientStore"); } _context = context; _tokenType = tokenType; _scopeStore = scopeStore; _clientStore = clientStore; }
public AuthorizationCodeStore(OperationalContext context, IScopeStore scopeStore, IClientStore clientStore) : base(context, TokenType.AuthorizationCode, scopeStore, clientStore) { }
public TokenHandleStore(OperationalContext context, IScopeStore scopeStore, IClientStore clientStore) : base(context, Entities.TokenType.TokenHandle, scopeStore, clientStore) { }
public RefreshTokenStore(OperationalContext context, IScopeStore scopeStore, IClientStore clientStore) : base(context, TokenType.RefreshToken, scopeStore, clientStore) { }
public static void Init(CommandProcessorOptions options) { Verbosity = options.Verbosity.Value; IsMarkupEnabled = options.EnableLoggingMarkup == true; ToolModeLevel = options.ToolContext.Value; }