Written by: Bruce Chapman Wednesday, February 13, 2008 2:38 PM
' use reflection to get the type of the classobjType = BuildManager.GetType(TypeName, True, True)
private void CacheTypes(string cacheTypeList){ if (cacheTypeList != null) { string[] cacheTypes = cacheTypeList.Split(';'); foreach (string cacheType in cacheTypes) { if (cacheType != null && cacheType.Length > 0) { string[] parts = cacheType.Split(':'); string type = parts[0]; string cacheKey = parts[1]; object typeObject = DotNetNuke.Framework.Reflection.CreateType(type, cacheKey, true, true); if (typeObject == null) Console.WriteLine("Type failed on pre-load: " + type); else Console.WriteLine("Type load succeeded : " + type); } } }}
DotNetNuke.Security.Membership.Data.SqlDataProvider,DotNetNuke.Membership.Dataprovider:DotNetNuke.Security.Membership.Data.SqlDataProvider;DotNetNuke.Data.SqlDataProvider,DotNetNuke.SqlDataProvider:DotNetNuke.Data.SqlDataProvider
1 comment(s) so far...
Re: Bludgeoning DotNetNuke Unit Testing into life Hi, I use the unit test program posted on 'Unit Testing a DotNetNuke Private Assembly Module" at CodeProject and met the DataProvider type initial problem. I jumped to this article from the answer of you in the comment.I try to add the CacheTypes function into the DnnUnitTest.cs, but the last couple of lines in this article confused me, Do I need to include all four lines of this:DotNetNuke.Security.Membership.Data.SqlDataProvider,DotNetNuke.Membership.Dataprovider:DotNetNuke.Security.Membership.Data.SqlDataProvider;DotNetNuke.Data.SqlDataProvider,DotNetNuke.SqlDataProvider:DotNetNuke.Data.SqlDataProviderinto the paramentes of CacheTypes function?
Re: Bludgeoning DotNetNuke Unit Testing into life
Hi, I use the unit test program posted on 'Unit Testing a DotNetNuke Private Assembly Module" at CodeProject and met the DataProvider type initial problem. I jumped to this article from the answer of you in the comment.I try to add the CacheTypes function into the DnnUnitTest.cs, but the last couple of lines in this article confused me, Do I need to include all four lines of this:DotNetNuke.Security.Membership.Data.SqlDataProvider,DotNetNuke.Membership.Dataprovider:DotNetNuke.Security.Membership.Data.SqlDataProvider;DotNetNuke.Data.SqlDataProvider,DotNetNuke.SqlDataProvider:DotNetNuke.Data.SqlDataProviderinto the paramentes of CacheTypes function?