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
| Component.For<IEnvironment>() | |
| .ImplementedBy<BasicEnvironment>() | |
| .OnCreate((kernel, component) => | |
| { | |
| var benvironment = (BasicEnvironment)component; | |
| GraphicsDeviceManager gman = kernel.Resolve<GraphicsDeviceManager>(); | |
| } |
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
| Component.For<IEnvironment>() | |
| .ImplementedBy<BasicEnvironment>() | |
| .OnCreate((kernel, component,GraphicsDeviceManager gman) => | |
| { | |
| var benvironment = (BasicEnvironment)component; | |
| } |
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 Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| int x=3, y=4; | |
| Assert.That(()=>x==y); | |
| } | |
| } | |
| public class Assert | |
| { |
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
| [Test] | |
| public void Can_register_handler_forwarding_with_keys() | |
| { | |
| IKernel kernel = new DefaultKernel(); | |
| kernel.Register( | |
| Component.For<IRepository>() | |
| .ImplementedBy<MyRepository>() | |
| .Named("myComponent") | |
| ); | |
| kernel.RegisterHandlerForwarding("newComponent","myComponent"); |
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
| //DOES NOT SHOW THE USERNAME+HELLO IN THE username BOX | |
| [AcceptVerbs(HttpVerbs.Post)] | |
| public ActionResult Index(string username) | |
| { | |
| ViewData["username"] = username + "helloo"; | |
| return View(); | |
| } | |
| //DOES SHOW THE EMAIL+HELLO IN THE username BOX |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace ConsoleApplication2 | |
| { | |
| using System.Runtime.Serialization; | |
| class Thing1 |
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 SimulationTimeSource : ITimeSource | |
| { | |
| private readonly LiveLab game; | |
| private TimeSpan timeSpan; | |
| public SimulationTimeSource(LiveLab game) | |
| { | |
| this.game = game; | |
| this.timeSpan = new TimeSpan(); | |
| this.game.GameUpdated += (timeSpan) => | |
| this.timeSpan = timeSpan.Add(timeSpan); |
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
| from visual import * | |
| print """ | |
| Right button drag to rotate "camera" to view scene. | |
| On a one-button mouse, right is Command + mouse. | |
| Middle button to drag up or down to zoom in or out. | |
| On a two-button mouse, middle is left + right. | |
| On a one-button mouse, middle is Option + mouse. | |
| """ |
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
| /* | |
| * Reference.h | |
| * | |
| * Created on: Mar 28, 2010 | |
| * Author: tehlike | |
| */ | |
| #include "../Threading/Mutex.h" | |
| #ifndef REFERENCE_H_ | |
| #define REFERENCE_H_ | |
| template <typename T> |
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
| IWindsorContainer container=null; | |
| container.Register( | |
| Fluently.ConfigureFacility() | |
| .Id("nhibernateFacility") | |
| .DefaultConfigurationBuilder<DefaultConfigurationBuilder>() | |
| .DefaultConfigurationPersister<DefaultConfigurationPersister>() | |
| .AddFactory( | |
| Fluently.ConfigureFactory() | |
| .Alias("myAlias") | |
| .Id("myId") |