xztaityozx / SerializableExceptionGenerator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SerializableExceptionGenerator

This SourceGenerator Generate Serializable exception class

Usage

using SerializableExceptionGenerator;

namespace Example;

[SerializableException]
public partial class ExampleException : Exception {}

generate

// <auto-generated>
// THIS FILE IS GENERATED BY SerializableExceptionGenerator. DO NOT EDIT IT.
// </auto-generated>

namespace Example;

[global::System.Serializable]
public partial class ExampleException : global::System.Exception
{
	public ExampleException() { }
	public ExampleException(string message) : base(message) { }
	public ExampleException(string message, global::System.Exception inner) : base(message, inner) { }
	protected ExampleException(
		global::System.Runtime.Serialization.SerializationInfo info,
		global::System.Runtime.Serialization.StreamingContext context
	) : base(info, context) { }
}

References

License

MIT

About

License:MIT License


Languages

Language:C# 100.0%