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
E:\mEE_Work\twisqs>bundle install | |
Fetching source index for http://rubygems.org/ | |
Using rake (0.8.7) | |
Using abstract (1.0.0) | |
Using activesupport (3.0.5) | |
Using builder (2.1.2) | |
Using i18n (0.5.0) | |
Using activemodel (3.0.5) | |
Using erubis (2.6.6) | |
Using rack (1.2.1) |
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
System.Web.Mvc (Quick Project) (analysis done 1 day ago, Sat 19 Feb 10:16 most recent) | |
SELECT TYPES FROM ASSEMBLIES "System.Web.Mvc" WHERE IsInternal | |
ORDER BY NbMethods DESC | |
102 items | |
--------------------------------------------------+--------------+ | |
types |# Methods | | |
--------------------------------------------------+--------------+ |
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 Info | |
public abstract class Controller : ControllerBase, IActionFilter, IAuthorizationFilter, IDisposable, IExceptionFilter, IResultFilter, IController | |
- { } System.Web.Mvc | |
- System.Web.Mvc, v3.0.0.0 | |
# IL instructions: 1 022 | |
# lines of code (LOC): N/A because the assembly's corresponding PDB file N/A at analysis time | |
# lines of comment: N/A because the assembly's corresponding PDB file N/A at analysis time |
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 MvcInstaller : IWindsorInstaller | |
{ | |
public void Install(IWindsorContainer container, IConfigurationStore store) | |
{ | |
container.AddFacility<MvcFacility>(f => f.RegisterControllers()); | |
} | |
} |
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
Order.transaction do | |
(1..100).each do |i| | |
Order.create(:name => "Customer #{i}", :address => "#{i} main street", :email => "customer-#{i}@gmail.com", :pay_type => "Check") | |
end | |
end |
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
e:\test>rails runner script/some_script.rb | |
d:/dev/rb/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands/runner.rb:50:in `eval': undefined local variable or | |
method `script' for main:Object (NameError) | |
from d:/dev/rb/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands/runner.rb:50:in `eval' | |
from d:/dev/rb/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands/runner.rb:50:in `<top (required)>' | |
from d:/dev/rb/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:39:in `require' | |
from d:/dev/rb/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:39:in `<top (required)>' | |
from script/rails:6:in `require' | |
from script/rails:6:in `<main>' |
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 Object instance; | |
public override void Dispose() | |
{ | |
var localInstance = instance; | |
if (localInstance == null) | |
{ | |
return; | |
} | |
// we're trying to atomically replace the instance with null. |
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
// in your IContributeComponentModelConstruction | |
protected virtual void CollectFromConfiguration(ComponentModel model) | |
{ | |
if(Something()) | |
{ | |
var options = ProxyUtil.ObtainProxyOptions(model, true); | |
options.Selector = new ComponentReference<IInterceptorSelector>("someIdOrType"); | |
} | |
} |
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 AsyncHelper | |
{ | |
private volatile bool allDone = false; | |
private volatile int doneCount = 0; | |
private int actionsCount; | |
private ICollection<Exception> exceptions = new List<Exception>(); | |
public bool ExecuteInParallel(params System.Action[] actions) | |
{ | |
if (actions == null || actions.Length == 0) return false; |
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
patterns and antipatterns of IoC container usage (in broad, broad strokes) | |
- antipatterns | |
service locator | |
static dependencies | |
xml programming | |