/*
 * SPDX-FileCopyrightText: Copyright Corsinvest Srl
 * SPDX-License-Identifier: AGPL-3.0-only
 */

//using System.Runtime.CompilerServices;

//namespace Corsinvest.AppHero.Core.Extensions;

//public static class ObjectExtensions
//{
//    [MethodImpl(MethodImplOptions.AggressiveInlining)]
//    public static T As<T>(this object obj) where T : class => (T)obj;

//    //public static T To<T>(this object obj)
//    //    where T : struct
//    //{
//    //    if (typeof(T) == typeof(Guid))
//    //    {
//    //        return (T)TypeDescriptor.GetConverter(typeof(T)).ConvertFromInvariantString(obj.ToString());
//    //    }

//    //    return (T)Convert.ChangeType(obj, typeof(T), CultureInfo.InvariantCulture);
//    //}  
//}