У меня есть много классов, которые реализуют интерфейс. Всякий раз, когда я определяю класс, я должен написать что-то подобное в определении класса:
interface Model.IModel with
member this.Assets = modelArg.Assets
member this.AuxData = modelArg.AuxData
member this.Benchmark = modelArg.Benchmark
member this.CalcPeriods = modelArg.CalcPeriods
member this.CashTicker = modelArg.CashTicker
member this.Description = modelArg.Description
member this.FirstValidDate = modelArg.FirstValidDate
member this.Name = modelArg.Name
member this.ParamData = modelArg.ParamData
member this.ParamList = modelArg.ParamList
member this.Strategy = modelArg.Strategy
member this.CalcStartTime with get() = calcStartTime and
set v = calcStartTime <- v
member this.Counter with get() = counter and
set v = counter <- v
Есть ли способ избежать повторения этого для каждого класса, производного от интерфейса IModel? Код идентичен во всех случаях.