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 dynamic CreatePerson() | |
{ | |
dynamic person = new ExpandoObject(); | |
//Set the two commands. | |
person.CancelCommand = new RelayCommand(() => | |
{ | |
person.FirstName = "[First name ...]"; | |
person.LastName = "[Last name ...]"; | |
}); |
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
//this does not compile | |
new int[] {1, 2, 3, 4, 5, 6}.Select(i => new { i , root = () => i * i }) ; | |
//this does not compile | |
var query = from i in new int[] {1, 2, 3, 4, 5, 6} | |
select new | |
{ | |
i, | |
root = () => i * i | |
}; |
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
var query = new[] {1, 2, 3, 4, 5, 6, 7}.Select(i => { | |
dynamic expando = new ExpandoObject(); | |
expando.i = i; | |
expando.root = () => i * i; | |
return expando | |
}); | |
foreach(dynamic item in query){ | |
Console.WriteLine(item.root()); | |
} |
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
namespace GenWise.Security.Service | |
{ | |
public interface ISecurityService | |
{ | |
/// <summary> | |
/// Create a new operation. | |
/// | |
/// Operation Id could be in the form of: | |
/// /Module/UseCase/Action | |
/// |
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 NHibernate.SqlTypes; | |
namespace NHibernate.Type | |
{ | |
/// <summary> | |
/// Maps a <see cref="System.Boolean" /> to a 1 char <see cref="System.Data.DbType.AnsiStringFixedLength" /> column | |
/// that stores a <code>'Y'/'N'</code> to indicate <code>true/false</code>. | |
/// </summary> | |
/// <remarks> |
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 MyFacility : AbstractFacility | |
{ | |
protected override void Init() | |
{ | |
Kernel.ComponentRegistered += Kernel_ComponentRegistered; | |
} | |
void Kernel_ComponentRegistered(string key, IHandler handler) | |
{ |
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
<Target Name="PackResult"> | |
<ItemGroup> | |
<BuildResult Include="GenWise.Security.Oracle\bin\$(Configuration)\**\GenWise*" /> | |
<BuildResult Include="GenWise.Security.Service\bin\$(Configuration)\**\GenWise*" /> | |
<BuildResult Include="GenWise.Security.WPF\bin\$(Configuration)\**\GenWise*" /> | |
</ItemGroup> | |
<PropertyGroup> |
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
<Target Name="PackResult"> | |
<ItemGroup> | |
<BuildResult Include="GenWise.Security.Oracle\bin\$(Configuration)\**\GenWise*" /> | |
<BuildResult Include="GenWise.Security.Service\bin\$(Configuration)\**\GenWise*" /> | |
<BuildResult Include="GenWise.Security.WPF\bin\$(Configuration)\**\GenWise*" /> | |
</ItemGroup> | |
<PropertyGroup> |
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 DictionaryExtensions | |
{ | |
public static TValue GetOrAdd<TKey, TValue>( | |
this IDictionary<TKey, TValue> dictionary, TKey key, Func<TValue> create) | |
{ | |
TValue result; | |
if(!dictionary.TryGetValue(key, out result)) | |
{ | |
result = create(); | |
dictionary[key] = result; |
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 NUnit.Framework; | |
using SharpTestsEx; | |
using Suaquia.Tests.SampleDomain; | |
using Suquia; | |
namespace Suaquia.Tests | |
{ | |
[TestFixture] | |
public class DependencyExamples |