This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ConsoleApplication2 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var assembly = Assembly.LoadFile(AppDomain.CurrentDomain.BaseDirectory+ "ConsoleApplication2.exe"); | |
var types = assembly.GetTypes(); | |
var interfaces = types.Where(t => t.IsInterface); | |
var implemetions = types.Where(t => !t.IsInterface && !t.IsAbstract); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RestSharpJsonDeserializer : IDeserializer | |
{ | |
private static JsonSerializerSettings jsonSettings = new JsonSerializerSettings | |
{ | |
NullValueHandling = NullValueHandling.Ignore, | |
DefaultValueHandling = DefaultValueHandling.Ignore | |
}; | |
public string DateFormat { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RestSharpJsonSerializer : ISerializer | |
{ | |
private static JsonSerializerSettings jsonSettings = new JsonSerializerSettings | |
{ | |
NullValueHandling = NullValueHandling.Ignore, | |
DefaultValueHandling = DefaultValueHandling.Ignore | |
}; | |
public RestSharpJsonSerializer() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//folder is virtual path | |
private void LoadAssemblies(string folder) | |
{ | |
try | |
{ | |
var directory = new DirectoryInfo(HostingEnvironment.MapPath(folder)); | |
var binFiles = directory.GetFiles("*.dll", SearchOption.AllDirectories).ToList(); | |
if (binFiles.Count == 0) | |
{ | |
logger.Warn("no dlls found!"); |
NewerOlder