-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
523 additions
and
178 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
part of '../../../televerse.dart'; | ||
|
||
/// Represents additional options that can be passed to create Handler Scope | ||
class ScopeOptions { | ||
/// Name of the Handler Scope. | ||
/// | ||
/// This can be used to remove a Handler later on your code. | ||
final String? name; | ||
|
||
/// Whether the scope is forked. | ||
/// | ||
/// By default fork is set to `false` that is once a matching scope is found | ||
/// the processor only executes that particular scope and skips all the rest. | ||
/// | ||
/// When fork is set to `true` the successive Handler Scope is also considered | ||
/// and executed if it satisfies the predicate. | ||
final bool forked; | ||
|
||
/// Constructs a `ScopeOption`. | ||
/// | ||
/// - [name] - Name of the Handler Scope. This can be used to remove the scope later. | ||
/// | ||
/// - [forked] - A flag used to determine whether the succeeding handler should also be executed | ||
const ScopeOptions({ | ||
this.forked = false, | ||
this.name, | ||
}); | ||
|
||
/// Constructs a `ScopeOption` that is forked. This scope will allow the processing of subsequent handler scope as well. | ||
/// | ||
/// - [name] - Name of the Handler Scope. This can be used to remove the scope later. | ||
const ScopeOptions.forked({this.name}) : forked = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters