public ProjectLoaderLegacy(IAppContext context, ImageSerializationService imageSerializationService, ILayerService layerService) { if (imageSerializationService == null) { throw new ArgumentNullException("imageSerializationService"); } if (layerService == null) { throw new ArgumentNullException("layerService"); } _imageSerializationService = imageSerializationService; _layerService = layerService; _context = context as ISecureContext; if (_context == null) { throw new InvalidCastException("Application context must support ISerializable_context interface."); } }