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 readonly IOrderDataAccessor _accessor; | |
| public OrderRepository(IOrderDataAccessor accessor) | |
| { | |
| _accessor = accessor; | |
| } |
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
| _container.AddComponent<IOrderDataAccessor, XmlOrderDataAccessor>(); |
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 Order | |
| { | |
| public IEnumerable<OrderLine> OrderLines { get; set; } | |
| public Customer Customer { get; set; } | |
| public Order() : this(null, null) {} | |
| public Order(Customer customer) : this(customer, null) {} | |
| public Order(Customer customer, IEnumerable<OrderLine> orderLines) |
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 LoggingInterceptor : Castle.Core.Interceptor.IInterceptor | |
| { | |
| private readonly ILogger logger; | |
| public LoggingInterceptor(ILogger logger) | |
| { | |
| this.logger = logger; | |
| } | |
| public void Intercept(IInvocation invocation) |
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 struct TimedLock : IDisposable | |
| { | |
| private readonly object target; | |
| private TimedLock(object o) | |
| { | |
| target = o; | |
| } | |
| public void Dispose() |
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 void ProcessGroupsAndTheirMembers(ActiveDirectoryConfiguration adConfig) | |
| { | |
| List<GroupPrincipal> groupPrincipals = GetABunchOfGroupsFromActiveDirectory(adConfig); | |
| foreach (var groupPrincipal in groupPrincipals) | |
| { | |
| HandleGroup(groupPrincipal); | |
| DealWithMembers(groupPrincipal.Members); | |
| } | |
| } |
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
| IEnumerable<OrderView> outstandingOrders | |
| = orderManagementServiceProxy.GetOverviewOfAllOutstandingOrders(); | |
| Session["outstandingOrders"] = outstandingOrders; |
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 abstract class CircuitBreakerState | |
| { | |
| protected readonly CircuitBreaker circuitBreaker; | |
| protected CircuitBreakerState(CircuitBreaker circuitBreaker) | |
| { | |
| this.circuitBreaker = circuitBreaker; | |
| } | |
| public virtual void ProtectedCodeIsAboutToBeCalled() { } |
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 abstract class Disposable : IDisposable | |
| { | |
| private bool disposed; | |
| public void Dispose() | |
| { | |
| Dispose(true); | |
| GC.SuppressFinalize(this); | |
| } | |
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 IView | |
| { | |
| bool IsPostBack { get; } | |
| bool IsValid { get; } | |
| void DataBind(); | |
| void DisplayErrorMessage(string message); | |
| } |