Browse Source

Made an exception serializable and removed another.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1164/head
Dimitar Dobrev 6 years ago
parent
commit
1ea19d5a1e
  1. 6
      src/Generator/Generators/CSharp/CSharpSources.cs
  2. 14
      src/Generator/Utils/ExpressionEvaluator.cs

6
src/Generator/Generators/CSharp/CSharpSources.cs

@ -3291,10 +3291,4 @@ namespace CppSharp.Generators.CSharp @@ -3291,10 +3291,4 @@ namespace CppSharp.Generators.CSharp
}
}
}
internal class SymbolNotFoundException : Exception
{
public SymbolNotFoundException(string msg) : base(msg)
{}
}
}

14
src/Generator/Utils/ExpressionEvaluator.cs

@ -4,6 +4,8 @@ using System.ComponentModel; @@ -4,6 +4,8 @@ using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Security.Permissions;
using System.Text.RegularExpressions;
/// <summary>
@ -1345,6 +1347,7 @@ internal class ExpressionEvaluator @@ -1345,6 +1347,7 @@ internal class ExpressionEvaluator
}
}
[Serializable]
public class ExpressionEvaluatorSyntaxErrorException : Exception
{
public ExpressionEvaluatorSyntaxErrorException() : base()
@ -1354,6 +1357,17 @@ public class ExpressionEvaluatorSyntaxErrorException : Exception @@ -1354,6 +1357,17 @@ public class ExpressionEvaluatorSyntaxErrorException : Exception
{ }
public ExpressionEvaluatorSyntaxErrorException(string message, Exception innerException) : base(message, innerException)
{ }
protected ExpressionEvaluatorSyntaxErrorException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
[SecurityPermission(SecurityAction.LinkDemand, SerializationFormatter = true)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
}
}
internal class VariableEvaluationEventArg : EventArgs

Loading…
Cancel
Save