protected ISerializer <T> GetSerializer(Type aliasType) { if (aliasType == null) { return(_serializerFactory.Create <T>()); } var method = AliasCreateMethodInfo.MakeGenericMethod(typeof(T), aliasType); return((ISerializer <T>)method.Invoke(_serializerFactory, null)); }
protected object GetSerializer(Type itemType, Type aliasType) { if (aliasType == null) { var method = CreateMethodInfo.MakeGenericMethod(itemType); return(method.Invoke(_serializerFactory, null)); } var aliasMethod = AliasCreateMethodInfo.MakeGenericMethod(itemType, aliasType); return(aliasMethod.Invoke(_serializerFactory, null)); }