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 IViewPart | |
| { | |
| bool IsPostBack { get; } | |
| IDictionary State { get; } | |
| } |
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 DummyViewPartController : PartController<IDummyViewPart>, IDummyViewPartController | |
| { | |
| public DummyViewPartController(IDummyViewPart viewPart) : base(viewPart) {} | |
| public override void AddInitialRequests() | |
| { | |
| // add some initial requests to the IDispatcher | |
| } | |
| public override void GetInitialResponses() |
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 = DetachedCriteria.For<Product>() | |
| .SetFetchMode("Category", FetchMode.Join); |
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
| ALTER PROCEDURE [dbo].[GetProductsByCategoryId] | |
| @CategoryId int | |
| AS | |
| BEGIN | |
| SET NOCOUNT ON; | |
| SELECT [ProductID] | |
| ,[ProductName] | |
| ,[SupplierID] | |
| ,[CategoryID] |
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
| ALTER PROCEDURE [dbo].[GetProductsByCategoryId] | |
| @CategoryId int | |
| AS | |
| BEGIN | |
| SET NOCOUNT ON; | |
| SELECT [Products].[ProductID] as "Product.ProductID" | |
| ,[Products].[ProductName] as "Product.ProductName" | |
| ,[Products].[SupplierID] as "Product.SupplierID" | |
| ,[Products].[CategoryID] as "Product.CategoryID" |
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 Execute() | |
| { | |
| ArrayList empIds = PayrollDatabase.GetAllEmployeeIds(); | |
| foreach (int empId in empIds) | |
| { | |
| Employee employee = PayrollDatabase.GetEmployee(empId); | |
| if (employee.IsPayDate(payDate)) | |
| { |
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 Controller : IController | |
| { | |
| public IDependency Dependency { get; private set; } | |
| public Controller(IDependency myDependency) | |
| { | |
| Dependency = myDependency; | |
| } | |
| 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 interface IController : IDisposable | |
| { | |
| bool Disposed { get; set; } | |
| } | |
| public class Controller : IController | |
| { | |
| public void Dispose() | |
| { | |
| Disposed = true; |
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 Dispose() | |
| { | |
| Dependency.Dispose(); | |
| Disposed = true; | |
| } |
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 Resolvable<T> : Disposable | |
| { | |
| private readonly T instance; | |
| public Resolvable() : this(null) {} | |
| public Resolvable(object argumentsAsAnonymousType) | |
| { | |
| if (argumentsAsAnonymousType == null) | |
| { |