CacheHelper question or bug

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/5/2011 3:42:24 PM
Gravatar
Total Posts 92
Нет, я не изменил. До старости глубокой...

CacheHelper question or bug

Dears,

I updated my project to the version

and here an error appear in my custom user class (it is inherited from site user)

CacheHelper doesn't exist in the current context;

all references are ok, now I can not see CacheHelper, is it new feature or bug?

I just saw you are working on cache at the repository.

here below my unchanged code.

please advice

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Configuration;
using System.Data;
using System.Globalization;
using System.Linq;
using System.Security.Cryptography;
using log4net;
using mojoPortal.Data;
using mojoPortal.Business.Properties;
using AlJidara.Data;
using mojoPortal.Business;
using mojoPortal.Business.WebHelpers;

namespace AlJidara.Features.Business
{

   [Serializable]
    public class CompanySiteUser : SiteUser
{
 
        #region OLDConstructorsDelMe

       public  CompanySiteUser(SiteSettings settings)
            : base(CacheHelper.GetCurrentSiteSettings())
        {
            if (settings != null)
            {
                siteSettings = settings;
                siteID = siteSettings.SiteId;
                siteGuid = siteSettings.SiteGuid;
                timeZoneId = siteSettings.TimeZoneId;
                if (UseRelatedSiteMode) { siteID = RelatedSiteID; }
            }
        }

8/5/2011 3:43:55 PM
Gravatar
Total Posts 92
Нет, я не изменил. До старости глубокой...

Re: CacheHelper question or bug

sorry; revision 2460

8/5/2011 3:59:17 PM
Gravatar
Total Posts 18439

Re: CacheHelper question or bug

Hi Ghalib,

The CacheHelper class has been moved into the mojoPortal.Web project, so for your current code to work you will need to add a reference under the references node in your business project or else refactor your code to pass in SiteSettings from your UI code which should already have a reference to mojoPortl.Web.

Hope that helps,

Joe

8/5/2011 4:01:57 PM
Gravatar
Total Posts 18439

Re: CacheHelper question or bug

actually looking at this code you are already passing in SiteSettings so you just need to change it from this:

 public  CompanySiteUser(SiteSettings settings)
            : base(CacheHelper.GetCurrentSiteSettings())
        {

to this

 public  CompanySiteUser(SiteSettings settings)
            : base(settings)
        {

Hope that helps,

Joe

8/5/2011 4:06:07 PM
Gravatar
Total Posts 92
Нет, я не изменил. До старости глубокой...

Re: CacheHelper question or bug

o it worked, thanks a lot

You must sign in to post in the forums. This thread is closed to new posts.