Constructor for DataPortalResult is internal in CSLA vs. public in CSLALight [3.6.2]

Constructor for DataPortalResult is internal in CSLA vs. public in CSLALight [3.6.2]

Old forum URL: forums.lhotka.net/forums/t/6872.aspx


Jack posted on Wednesday, April 29, 2009

I was just implementing some NVL's into my BO and thought I would like to fill them all asynchronously. 

I copied the logic from the InventoryDemo but decided I wanted them async regardless of Silverlight or not.  However the step to just return the cached list doesn't work outside CSLALight because the required DataPortalResult method is not public.

Is that intentional and I shouldn't be doing what I want to do?  Thanks

jack

public static void GetProductCategories(EventHandler<DataPortalResult<ProductCategories>> callback)
    {
      if (_cache != null)
      {
        callback(null, new DataPortalResult<ProductCategories>(_cache, null, null));
      }
      else
      {
        var dp = new DataPortal<ProductCategories>();
        dp.FetchCompleted += (o, e) =>
        {
          _cache = e.Object;
          callback(dp, e);
        };
        dp.BeginFetch();
      }
    }


Jack replied on Friday, May 01, 2009

bump...

RockfordLhotka replied on Sunday, May 17, 2009

I'll add this to the wish list, as the Windows/.NET class should match the SL class in this regard.

Copyright (c) Marimer LLC