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
| [TestFixture] | |
| public class PingbackServiceTests | |
| { | |
| private IPingbackService pingbackService; | |
| private HttpChannel channel; | |
| private IPostService postService; | |
| private IHttpClient httpClient; | |
| [SetUp] | |
| public void SetUp() | |
| { |
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 Guard | |
| { | |
| public static void NotNull(object item,string propName) | |
| { | |
| if(item==null) | |
| throw new ArgumentNullException(propName); | |
| } | |
| public static void NotNull(Expression<Func<object>> item) | |
| { | |
| if(item.Compile()()==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
| namespace BlogSharp.CastleExtensions.Tests.Facilities | |
| { | |
| using System; | |
| using Castle.MicroKernel.Registration; | |
| using Castle.Windsor; | |
| using CastleExtensions.Facilities.EnrichFacility; | |
| using NUnit.Framework; | |
| [TestFixture] | |
| public class EnrichWithFacilityTests |
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
| [Export(typeof(TextViewService))] | |
| [ContentType("Text")] | |
| private void CreateViewService(IWpfTextView textView, IEnvironment context) | |
| { | |
| using (var edit = textView.TextBuffer.CreateEdit()) | |
| { | |
| edit.Insert(2, "osman"); | |
| edit.Apply(); | |
| } | |
| } |
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
| asdasdasd |
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 MyEntityAuditMap:AuditClassMap<MyEntity> | |
| { | |
| public MyEntityAuditMap() | |
| { | |
| Audited(); | |
| NotAudited(x=>x.BlahBlah); | |
| } | |
| } | |
| public class MyEntityAuditMap2:AuditClassMap<MyEntity2> |
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
| AuditConfiguration x=new AuditConfiguration(); | |
| x.Add<MyEntity>().AuditAll() | |
| .Except(x=>x.Blahblah) | |
| .Except(x=>x.BlahBlah2) | |
| .Add<MyEntity2>().Audit(x=>x.Blahblah) | |
| .Audit(x=>x.Blahblah); |
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
| cfg.ConfigureEnvers() | |
| .AuditOptimisticLockingField() | |
| .RevisionEntity<DefaultRevisionEntity>(revisionEntityConf => | |
| { | |
| revisionEntityConf.RevisionNumber(x => x.Id); | |
| revisionEntityConf.RevisionTimestamp(x => x.Timestamp); | |
| }) | |
| .UsingMetadataProvider<FluentMetadataProvider>() | |
| .ConfigureAuditTables(auditTableConf => | |
| { |
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 (ISession s = OpenSession()) | |
| { | |
| var item = s.Get<Member>(id); | |
| item.FirstName = "blah"; | |
| var ssi = ((ISessionImplementor) s); | |
| EntityEntry ee = ssi.PersistenceContext.GetEntry(item); | |
| var loaded=ee.GetLoadedValue("FirstName"); | |
| var current = item.FirstName; | |
| } |
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
| install ninject: | |
| get_from svn("http://ninject.googlecode.com/svn/trunk") | |
| build_with nant, buildfile("Ninject.build"), FrameworkVersion35 | |
| switches: | |
| parameters "skip.tests=true" | |
| with: | |
| tasks release,clean,all |
OlderNewer