Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LightList is gone #1379

Closed
SCullman opened this issue Nov 17, 2017 · 2 comments
Closed

LightList is gone #1379

SCullman opened this issue Nov 17, 2017 · 2 comments

Comments

@SCullman
Copy link
Contributor

SCullman commented Nov 17, 2017

I'm submitting a ...
[x] bug report

...about

[x] Razor templating
[x] Content Types or data management

Current behavior

I want to check whether a columns has any values inside:

@functions{

 System.Collections.Generic.Dictionary<string,bool> HasValues = new System.Collections.Generic.Dictionary<string,bool>();
 
 bool Any(string colName){
     if (HasValues.ContainsKey(colName)) return HasValues[colName];
     
     var lang = Dnn.Tab.CultureCode;
     var data = Data["Default"].LightList ;
     var any = data.Any(o=> !string.IsNullOrWhiteSpace(o.Attributes[colName][lang].ToString()));
     HasValues[colName] = any;
     return any;     
 }
}

It fails now:
'IDataStream' does not contain a definition for 'LightList' and no extension method 'LightList' accepting a first argument of type 'IDataStream'
Expected behavior
LightList should work again

Minimal reproduction of the problem with instructions
Just copy the code in a razor script.

  • 2sxc version(s): 9.8.0
  • Browser: all
  • DNN: all
  • Language: any
@iJungleboy
Copy link
Contributor

@SCullman just fyi: "List" is what LightList used to be.

We had assumed nobody except for us (2sic) uses the LightList, so we didn't leave it in. I'll quickly do a review if we'll re-include it, but List is what you want to go for in the future.

@iJungleboy iJungleboy added this to the 2sxc 9.9 Angular 5 Support milestone Nov 17, 2017
@SCullman
Copy link
Contributor Author

I switched to List and it works for me.

@iJungleboy iJungleboy added this to Ready For Review in 2sxc 9.07 to 9.14 LTS Nov 20, 2017
@iJungleboy iJungleboy moved this from Ready For Review to Released 9.9 in 2sxc 9.07 to 9.14 LTS Nov 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
2sxc 9.07 to 9.14 LTS
  
Released 9.9
Development

No branches or pull requests

2 participants