using ProjectManagementSystem.Common.Logger;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ProjectManagementSystem.Common.Function
{
	public static class InstanceConstructor
	{
		public static T GetInstance<T>(string assemblyString, string fullClassName)
		{
			try
			{
				return (T)System.Reflection.Assembly.Load(assemblyString).CreateInstance(fullClassName, false);
			}
			catch (Exception ex)
			{
				CLog.Instance.SystemLog.WriteException("InstanceConstructor", ex);
			}
			return default(T);
		}
	}
}
