Perhaps you can use several interfaces
public interface ICarBasic { double Speed { get; set; } } public interface ICar : ICarBasic { FuelType FuelType { get; set; } }
Or write your entire base object as base classes. Inherit from them to make complete classes using the new assembly. Providing developers with a third-party project, only assembly with base classes can solve your problem.
Assembly 1 (for other developers)
using Model; namespace ModelLite { public class Car { private Model.Car car = new Model.Car(); public double Speed { get { return this.car.Speed; } set { this.car.Speed = value; } } } }
Unit 2 (fully functional)
using ModelLite namespace Model { public class Car : ModelLite.Car { private FuelType m_fuelType; public FuelType FuelType { get { return m_fuelType; } set { m_fuelType = value; } } } }
Only give assembly 1 to other developers.
Nanook
source share