Skip to content

Instantly share code, notes, and snippets.

View kkozmic's full-sized avatar
🎯
Focusing

Krzysztof Kozmic kkozmic

🎯
Focusing
View GitHub Profile
public class MyObject:INotifyPropertyChanged
{
public ICommand Comand { get; set; }
private string inputText;
public string InputText
{
get { return inputText; }
<Window x:Class="TypeWrapping.WpfSample.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<StackPanel Width="200" Name="Foo">
<TextBox Text="{Binding InputText, Mode=TwoWay}"></TextBox>
<Button Command="{Binding UpdateCommand}" Margin="0,3,0,3">Click Here</Button>
<TextBlock Text="{Binding OutputText}"></TextBlock>
</StackPanel>
public class MyObject:INotifyPropertyChanged
{
public ICommand UpdateCommand { get; set; }
private string inputText;
public string InputText
{
get { return inputText; }
using System;
using System.Linq;
namespace DP_perf_1
{
using System.Data;
using System.Diagnostics;
using System.ServiceModel;
using System.Web;
using System.Windows;
// instead of this
Component.For<ITwo>().ImplementedBy<Two>().LifeStyle.PerWcfSession().Interceptors(
InterceptorReference.ForType<CollectingInterceptor>()).Anywhere
// do this
Component.For<ITwo>().ImplementedBy<Two>().LifeStyle.PerWcfSession().InterceptedBy<CollectingInterceptor>()
[Test]
public void Can_dynamically_override_service_overrides()
{
kernel.Register(
Component.For<ICustomer>()
.ImplementedBy<CustomerImpl>()
.Named("defaultCustomer"),
Component.For<ICustomer>().ImplementedBy<CustomerImpl2>()
.Named("otherCustomer")
.Parameters(
[Test]
public void Member_should_action()
{
Action action = () => { };
kernel.Register(
Component.For<HasDependencies>()
.Parameters(
Parameter.ForKey("date").Eq(new DateTime(2009, 12, 12)),
Parameter.ForKey("Action").Eq(action),
Parameter.ForKey("Uri").Eq(new Uri("http://castleproject.org")),
namespace ConsoleApplication2
{
using System.Diagnostics;
using Castle.MicroKernel.Registration;
using Castle.Windsor;
class Program
{
static void Main(string[] args)
public abstract class WcfLifestyle<TExtensibleObject, TCache> : AbstractLifestyleManager, IWcfLifestyle
where TExtensibleObject : class, IExtensibleObject<TExtensibleObject>
where TCache : class, IWcfLifestyleCache<TExtensibleObject>, new()
SELECT benchmarkr0_.User as User2_,
benchmarkr0_.Id as Id2_,
benchmarkr0_.Id as Id0_1_,
benchmarkr0_.BenmchmarkName as Benmchma2_0_1_,
benchmarkr0_.ComputerModel as Computer3_0_1_,
benchmarkr0_.Score as Score0_1_,
benchmarkr0_.[User] as User5_0_1_,
user1_.Id as Id1_0_,
user1_.Name as Name1_0_,
user1_.Email as Email1_0_,