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
<client> | |
<endpoint binding="basicHttpBinding" bindingConfiguration="firstServiceBinding" | |
contract="Agatha.Common.WCF.IWcfRequestProcessor" | |
name="firstService" /> | |
<endpoint binding="basicHttpBinding" bindingConfiguration="secondServiceBinding" | |
contract="Agatha.Common.WCF.IWcfRequestProcessor" | |
name="secondService" /> | |
</client> |
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 ConnectionLeakTest | |
{ | |
private static ISessionFactory sessionFactory; | |
static ConnectionLeakTest() | |
{ | |
sessionFactory = new Configuration() | |
.Configure() | |
.AddAssembly("MyAssembly") |
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 DummyEnlistmentNotification : IEnlistmentNotification | |
{ | |
public static readonly Guid Id = new Guid("E2D35055-4187-4ff5-82A1-F1F161A008D0"); | |
public void Prepare(PreparingEnlistment preparingEnlistment) | |
{ | |
preparingEnlistment.Prepared(); | |
} | |
public void Commit(Enlistment enlistment) |
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 TenantSessionFactoryManager : ITenantSessionFactoryManager | |
{ | |
private readonly ITenantContext tenantContext; | |
private readonly ITenantInfoHolder tenantInfoHolder; | |
private readonly string mappingAssemblyName; | |
private readonly object writeLock = new object(); | |
private Dictionary<Guid, ISessionFactory> sessionFactories; | |
public TenantSessionFactoryManager(ITenantContext tenantContext, ITenantInfoHolder tenantInfoHolder, string mappingAssemblyName) |
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 TenantSessionFactoryManager : ITenantSessionFactoryManager | |
{ | |
private readonly ITenantContext tenantContext; | |
private readonly ITenantInfoHolder tenantInfoHolder; | |
private readonly string mappingAssemblyName; | |
private readonly object writeLock = new object(); | |
private Dictionary<Guid, ISessionFactory> sessionFactories; | |
public TenantSessionFactoryManager(ITenantContext tenantContext, ITenantInfoHolder tenantInfoHolder, string mappingAssemblyName) |
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 MyProjectRequest : Request | |
{ | |
public string UserName { get; set; } | |
public byte[] PasswordHash { get; set; } | |
} | |
public class MyProjectResponse : Response {} |
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 MyClass | |
{ | |
public void DoSomething() | |
{ | |
Console.WriteLine("i'm doing something important"); | |
} | |
} |
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 interface IAsyncRequestDispatcherFactory | |
{ | |
IAsyncRequestDispatcher CreateAsyncRequestDispatcher(); | |
} | |
public class AsyncRequestDispatcherFactory : IAsyncRequestDispatcherFactory | |
{ | |
public IAsyncRequestDispatcher CreateAsyncRequestDispatcher() | |
{ | |
return IoC.Container.Resolve<IAsyncRequestDispatcher>(); |
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
// Implements application logic using the ChinookEntities context. | |
// TODO: Add your application logic to these methods or in additional methods. | |
// TODO: Wire up authentication (Windows/ASP.NET Forms) and uncomment the following to disable anonymous access | |
// Also consider adding roles to restrict access as appropriate. | |
// [RequiresAuthentication] | |
[EnableClientAccess()] | |
public class AlbumService : LinqToEntitiesDomainService<ChinookEntities> | |
{ | |
// TODO: Consider |
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 NHibernateTest | |
{ | |
private Configuration configuration; | |
protected ISessionFactory sessionFactory; | |
[TestFixtureSetUp] | |
public void TestFixtureSetup() | |
{ | |
configuration = new Configuration() | |
.Configure() |