public void AddScope(int scopeId) { if ( Scopes.FirstOrDefault( s => s.ScopeId == scopeId ) == null ) { Scope s = new Scope( scopeId ); if ( s.ScopeId > 0 ) { Scopes.Add( s ); } else { throw new ArgumentException( "Scope not found.", "scopeId" ); } } }
private bool ScopeIdentifierInUse() { Scope s = new Scope(Identifier); return s.ScopeId > 0; }
private void Init() { AuthorizationId = 0; ClientId = 0; ScopeId = 0; LoginId = null; DateCreated = DateTime.MinValue; Active = false; mClient = null; mScope = null; mUser = null; }