The result of some sort of operation. A result is either successful or not, but if it is successful then there may be a set of warnings/messages associated with it. These warnings describe the performed error recovery operations.
More...
|
| void | AddMessage (string message) |
| | Adds a new message to this result.
|
| |
|
void | AddMessages (fsResult result) |
| | Adds only the messages from the other result into this result, ignoring the success/failure status of the other result.
|
| |
| fsResult | Merge (fsResult other) |
| | Merges the other result into this one. If the other result failed, then this one too will have failed.
|
| |
|
fsResult | AssertSuccess () |
| | A simply utility method that will assert that this result is successful. If it is not, then an exception is thrown.
|
| |
|
fsResult | AssertSuccessWithoutWarnings () |
| | A simple utility method that will assert that this result is successful and that there are no warning messages. This throws an exception if either of those asserts are false.
|
| |
|
|
static fsResult | Warn (string warning) |
| | Create a result that is successful but contains the given warning message.
|
| |
|
static fsResult | Fail (string warning) |
| | Create a result that failed.
|
| |
|
static fsResult | operator+ (fsResult a, fsResult b) |
| | Only use this as +=!
|
| |
|
|
static fsResult | Success |
| | A successful result.
|
| |
|
|
bool | Failed [get] |
| | Did this result fail? If so, you can see the reasons why in RawMessages.
|
| |
|
bool | Succeeded [get] |
| | Was the result a success? Note that even successful operations may have warning messages (RawMessages) associated with them.
|
| |
|
bool | HasWarnings [get] |
| | Does this result have any warnings? This says nothing about if it failed or succeeded, just if it has warning messages associated with it.
|
| |
|
Exception | AsException [get] |
| | Utility method to convert the result to an exception. This method is only defined is Failed returns true.
|
| |
The result of some sort of operation. A result is either successful or not, but if it is successful then there may be a set of warnings/messages associated with it. These warnings describe the performed error recovery operations.
◆ AddMessage()
| void FullSerializer.fsResult.AddMessage |
( |
string | message | ) |
|
|
inline |
Adds a new message to this result.
- Parameters
-
◆ Merge()
Merges the other result into this one. If the other result failed, then this one too will have failed.
Note that you can use += instead of this method so that you don't bury the actual method call that is generating the other fsResult.
The documentation for this struct was generated from the following file:
- /Users/yiyangshang/egdl2/Assets/eag/Scripts/enablegames/Tracking/JSON Serializer/Source/fsResult.cs