This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<MyClass> matches = new List<MyClass>(); | |
foreach(MyClass item in items){ | |
if(item.Category == selectedCategory) | |
{ | |
matches.Add(item); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<MyClass1> list = new List<MyClass1>(); | |
MyClass1 item = new MyClass1(); | |
list.Add(item); | |
list.Remove(item); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LessTransform : IBundleTransform | |
{ | |
public void Process(BundleContext context, BundleResponse response) | |
{ | |
response.Content = Less.Parse(response.Content, null); | |
response.ContentType = "text/css"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LessTransform : IBundleTransform | |
{ | |
public void Process(BundleContext context, BundleResponse response) | |
{ | |
var parser = new Parser(); | |
var importPath = context.HttpContext.Server.MapPath(context.BundleVirtualPath); | |
parser.Importer = new BundleImporter(importPath); | |
var env = new Env { Compress = true, Debug = true, KeepFirstSpecialComment = true, DisableVariableRedefines = false }; |