Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface IDocHandler<T>where T: class
- {
- T Document { get;set;}
- void Load(T doc);
- void Load(string PathToDoc);
- void Execute();
- void Execute(T doc);
- }
- public class FinanceDocumentProcessor:IDocumentHandler<ReportDocument>
- {}
- public class MarketingDocumentProcessor:IDocumentHandler<MediaDocument>
- {}
- IDocumentHandler<ReportDocument> docProc= new FinanceDocumentProcessor();
- IDocumentHandler<ReportDocument> docProc = container.resolve("FinanceDocumentProcessor());
- ChrystalReportHandler:IReportHandler<CrystalReportDocument>
- IReportHandler<T (this needs also to be injected)> = IOContainer.Resolve(MyMappedType here)
- public interface IDocumentHandler
- {
- IDocument Document { get; set; }
- void Load(IDocument doc);
- void Load(string PathToDoc);
- void Execute();
- void Execute(IDocument doc);
- }
- public class IDocument { }
- public class ReportDocument : IDocument { }
- public class MediaDocument : IDocument { }
- public class FinanceDocumentProcessor : IDocumentHandler { }
- public class MarketingDocumentProcessor : IDocumentHandler { }
- public interface IDocumentHandler { }
- public interface IDocumentHandler<T> : IDocumentHandler { }
Add Comment
Please, Sign In to add comment