Files
BeWoPlaner/Shared/Exceptions/BeWoNotImplementedException.cs
2025-07-25 14:27:57 +02:00

45 lines
1.0 KiB
C#

using BS.Shared.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.Exceptions
{
public class BeWoNotImplementedException : NotImplementedException
{
public BeWoNotImplementedException() : base()
{
}
public BeWoNotImplementedException(string message) : base(message)
{
}
public BeWoNotImplementedException(string message, Exception inner) : base(message, inner)
{
}
protected BeWoNotImplementedException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
public static BeWoNotImplementedException CreateFromEnum(Enum value)
{
var type = value.GetType().Name;
return new BeWoNotImplementedException($"{type} {value} ist nicht implementiert.");
}
public static BeWoNotImplementedException CreateFromInvalidObject(object obj)
{
var type = obj.GetType().Name;
var str = obj.ToString();
return new BeWoNotImplementedException($"{type}, {str}");
}
}
}