This file contains hidden or 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
ready: function (element, options) { | |
backColor = options.item.BackColor; | |
var detailHeader = element.querySelector('#detailHeader'); | |
detailHeader.style.msGridColumns = '80px 1fr 325px;'; //'1fr 300px'; | |
detailHeader.style.backgroundColor = backColor; | |
backButton.className = "win-backbutton backbutton"; | |
var zoomIn = document.querySelector("#zoomIn"); |
This file contains hidden or 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
[TestFixture] | |
class FilterTest | |
{ | |
[Test] | |
public void filterByBlue_return_2() | |
{ | |
// arrange | |
ProductFilter filter = new ProductFilter(); | |
IList<Product> products = BuildProducts(); |
This file contains hidden or 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
[TestFixture] | |
class FilterTest | |
{ | |
[Test] | |
public void filterByBlue_return_2() | |
{ | |
// arrange | |
ProductFilter filter = new ProductFilter(); | |
IList<Product> products = BuildProducts(); |
This file contains hidden or 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
class ProductRepository : IProductRepository | |
{ | |
private readonly IFileLoader loader; | |
private readonly IProductsMapper mapper; | |
public ProductRepository() | |
{ | |
loader = new FileLoader(); | |
mapper = new ProductsMapper(); | |
} |
This file contains hidden or 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
class FileLoader : IFileLoader | |
{ | |
public Stream Load(string fileName) | |
{ | |
return new FileStream(fileName, FileMode.Open); | |
} | |
} |
This file contains hidden or 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
class ProductRepository : IProductRepository | |
{ | |
public IEnumerable<Product> GetByFileName(string fileName) | |
{ | |
var products = new List<Product>(); | |
using (var fs = new FileStream(fileName, FileMode.Open)) | |
{ | |
var reader = XmlReader.Create(fs); | |
while (reader.Read()) | |
{ |
This file contains hidden or 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
private void btnLoad_Click(object sender, EventArgs e) | |
{ | |
listView1.Items.Clear(); | |
var fileName = txtFileName.Text; | |
using (var fs = new FileStream(fileName, FileMode.Open)) | |
{ | |
var reader = XmlReader.Create(fs); | |
while (reader.Read()) | |
{ | |
if (reader.Name != "product") continue; |
NewerOlder