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 BasePage : Page | |
| { | |
| public BasePage() | |
| { | |
| ObjectFactory.BuildUp(this); | |
| } | |
| } | |
| public partial class _Default : BasePage // new base class | |
| { |
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 static class IocBootstrap | |
| { | |
| public static void Configure() | |
| { | |
| ObjectFactory.Initialize(x => | |
| { | |
| x.Scan(scan => | |
| { | |
| scan.TheCallingAssembly(); | |
| scan.WithDefaultConventions(); |
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 Friend | |
| { | |
| public string name { get; set; } | |
| public string occupation { get; set; } | |
| } | |
| public class Enemy | |
| { | |
| public string name { get; set; } | |
| public string characteristics { get; set; } |
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 Rootobject | |
| { | |
| public string name { get; set; } | |
| public string occupation { get; set; } | |
| public Friend[] friends { get; set; } | |
| public Enemy[] enemies { get; set; } | |
| } | |
| public class Friend | |
| { |
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
| <configuration> | |
| <!-- ... snip ... --> | |
| <runtime> | |
| <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | |
| <dependentAssembly> | |
| <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" /> | |
| <bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="5.0.0.0" /> | |
| </dependentAssembly> | |
| </assemblyBinding> |
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 static class StatesProvinces | |
| { | |
| public static OrderedDictionary Dictionary | |
| { | |
| get | |
| { | |
| return new OrderedDictionary | |
| { | |
| {"AL", "Alabama"}, | |
| {"AK", "Alaska"}, |
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 static bool IsValidState(string state) | |
| { | |
| if(string.IsNullOrEmpty(state)) | |
| return false; | |
| return Dictionary.Contains(state); | |
| } |
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
| // which is the better design, given StateArgs? A or B? | |
| public class StateArgs | |
| { | |
| public bool IsValid { get; set; } | |
| public string Value { get; set; } | |
| } | |
| // A | |
| public static void ValidateState(StateArgs args) | |
| { |
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
| me@MYCOMPUTER /d/zproj/NuGetGallery (master) | |
| $ git status | |
| # On branch master | |
| # Changes not staged for commit: | |
| # (use "git add <file>..." to update what will be committed) | |
| # (use "git checkout -- <file>..." to discard changes in working directory) | |
| # | |
| # modified: src/NuGetGallery/NuGetGallery.csproj | |
| # modified: src/NuGetGallery/Web.config |
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
| me@MYCOMPUTER /d/zproj/NuGetGallery (master) | |
| $ git stash apply stash@{0} | |
| # On branch master | |
| # Changes not staged for commit: | |
| # (use "git add <file>..." to update what will be committed) | |
| # (use "git checkout -- <file>..." to discard changes in working directory) | |
| # | |
| # modified: src/NuGetGallery/NuGetGallery.csproj | |
| # modified: src/NuGetGallery/Web.config |