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
| // foos and bars are both List<string> | |
| foreach (var foo in foos) | |
| { | |
| bars.Any(e => e.Contains("something" + foo)).ShouldBeTrue(); | |
| } |
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
| // when I click the element after the page loads | |
| // nothing happens: no error, no alert, nothing. | |
| // when I run this same code in the JavaScript console | |
| // THEN it will show the alert | |
| // $("#" + context.reportId + " .some-css-class").length is 7 | |
| // in normal execution and in the console | |
| // what the heck am I doing wrong |
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
| public class version_test | |
| { | |
| [Test] | |
| public void test1() | |
| { | |
| Assert.That(new Version(1,0), Is.LessThan(new Version(2,0))); | |
| Assert.That(new Version(1,5), Is.LessThan(new Version(2,0))); | |
| Assert.That(new Version(1,int.MaxValue), Is.LessThan(new Version(2,0))); | |
| Assert.That(new Version(2,0), Is.EqualTo(new Version(2,0))); |
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
| [AspectRoleDependency(AspectDependencyAction.Order, AspectDependencyPosition.Before, StandardRoles.Tracing)] | |
| [Serializable] | |
| public class AspectA : OnMethodBoundaryAspect | |
| { | |
| // ... etc ... | |
| } |
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
| [Serializable] | |
| public class LazyLoadStructureMap : LocationInterceptionAspect | |
| { | |
| Lazy<object> _backingField; | |
| public override void OnGetValue(LocationInterceptionArgs args) | |
| { | |
| if (_backingField == null) | |
| _backingField = new Lazy<object>(() => | |
| { |
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
| <p> | |
| <select name="Associations[0].SomeId"> | |
| <option value="">Select...</option> | |
| <option value="7">AAA</option> <!-- why isn't a value in the dropdown selected? --> | |
| <option value="8">BBB</option> | |
| <option value="9">CCC</option> | |
| </select> | |
| <!-- but yet, the value here is populated --> | |
| <input name="Associations[0].Foo" type="text" value="whatever"> | |
| </p> |
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
| public class ReportingController : BaseController | |
| { | |
| public ActionResult Index() | |
| { | |
| var objDataSource = new ObjectDataSource(); | |
| objDataSource.DataSource = typeof (EzReportData); | |
| objDataSource.DataMember = "GetAllTerritories"; | |
| objDataSource.Parameters.Add("ez", typeof(int), 1); | |
| var report = new TerritoryReport(); |
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
| <!-- Latest compiled and minified CSS --> | |
| <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"> | |
| <!-- Optional theme --> | |
| <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css"> | |
| <!-- Latest compiled and minified JavaScript --> | |
| <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> |
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
| public class Global : HttpApplication | |
| { | |
| void Application_Start(object sender, EventArgs e) | |
| { | |
| RouteConfig.RegisterRoutes(RouteTable.Routes); | |
| BundleConfig.RegisterBundles(BundleTable.Bundles); | |
| IocBootstrap.Configure(); | |
| } | |
| } |
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
| public partial class _Default : Page | |
| { | |
| public IWhateverService WhateverService { private get; set; } | |
| public ISomethingElse SomethingElseService { private get; set; } | |
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| Response.Write(WhateverService.HelloWorld()); | |
| Response.Write(SomethingElseService.HelloWorld2()); | |
| } |