5 namespace SiliconStudio.Quantum
19 : base(GetMessage(expected, observed))
21 Expected = expected ??
"(NullMessage)";
22 Observed = observed ??
"(NullMessage)";
35 : base(GetMessage(expected, expectedArg, observed, observedArg))
39 Expected = string.Format(expected ??
"(NullMessage) [{0}]", expectedArg ??
"(NullArgument)");
43 Expected = expected ??
"(NullMessage) [{0}]";
47 Observed = string.Format(observed ??
"(NullMessage) [{0}]", observedArg ??
"(NullArgument)");
51 Observed = observed ??
"(NullMessage) [{0}]";
60 public string Expected {
get;
private set; }
65 public string Observed {
get;
private set; }
78 private static string Format(
string message,
string argument)
82 return string.Format(message ??
"(NullMessage) [{0}]", argument ??
"(NullArgument)");
86 return message ??
"(NullMessage) [(NullArgument)]";
91 private static string Format(
string message)
93 return message ??
"(NullMessage)";
97 private static string GetMessage(
string expected,
string observed)
99 return string.Format(
"Quantum consistency exception. Expected: {0} - Observed: {1}", Format(expected), Format(observed));
102 private static string GetMessage(
string expected,
string expectedArg,
string observed,
string observedArg)
104 return string.Format(
"Quantum consistency exception. Expected: {0} - Observed: {1}", Format(expected, expectedArg), Format(observed, observedArg));
QuantumConsistencyException(string expected, string observed, IModelNode node)
Initializes a new instance of the QuantumConsistencyException class.
An exception that occurs during consistency checks of Quantum objects, indicating that a IModelNode i...
QuantumConsistencyException(string expected, string expectedArg, string observed, string observedArg, IModelNode node)
Initializes a new instance of the QuantumConsistencyException class, with advanced string formatting...
The IModelNode interface represents a node in a model object. A model object is represented by a grap...