public ITranslationDefinitions <TIn, TOut> AddTranslations <TIn, TOut>(ITranslationDefinitions <TIn, TOut> definition, string defaultName = null) where TIn : INameReferences where TOut : IVmTranslatedItem { var model = definition.AddPartial <INameReferences, IVmTranslatedItem>(i => i, o => o).GetFinal(); if (string.IsNullOrEmpty(model?.DefaultTranslation) && !string.IsNullOrEmpty(defaultName)) { model.DefaultTranslation = defaultName; } return(definition); }
public ServiceChannelTranslationDefinitionHelper AddChannelBaseDefinition <TOut>(ITranslationDefinitions <ServiceChannelVersioned, TOut> definition) where TOut : VmServiceChannel { definition.AddPartial <ServiceChannelVersioned, VmServiceChannel>(input => input, output => output); return(this); }
public ServiceChannelTranslationDefinitionHelper AddOpeningHoursDefinition <TIn>(ITranslationDefinitions <TIn, ServiceChannelVersioned> definition) where TIn : IOpeningHours { definition.AddPartial(input => input.OpeningHours); return(this); }
public ITranslationDefinitions <ServiceChannelVersioned, TOut> AddChannelDescriptionsDefinition <TOut>(ITranslationDefinitions <ServiceChannelVersioned, TOut> definition) where TOut : IVmChannelDescription { return(definition.AddPartial(input => input, output => output as IVmChannelDescription)); }
public ServiceChannelTranslationDefinitionHelper AddChannelBaseDefinition <TIn>(ITranslationDefinitions <TIn, ServiceChannelVersioned> definition) where TIn : VmServiceChannel { definition.AddPartial <VmServiceChannel>(input => input); return(this); }
public ITranslationDefinitions <TIn, ServiceChannelVersioned> AddChannelDescriptionsDefinition <TIn>(ITranslationDefinitions <TIn, ServiceChannelVersioned> definition) where TIn : IVmChannelDescription { return(definition.AddPartial <IVmChannelDescription>(input => input)); }
public ITranslationDefinitions <ServiceHours, TOut> AddOpeningHoursDefinition <TOut>(ITranslationDefinitions <ServiceHours, TOut> definition) where TOut : VmHours { return(definition.AddPartial(input => input, output => output as VmHours)); }
public ITranslationDefinitions <TIn, ServiceHours> AddOpeningHoursDefinition <TIn>(ITranslationDefinitions <TIn, ServiceHours> definition) where TIn : VmHours { return(definition.AddPartial <VmHours>(input => input)); }
public ITranslationDefinitions <ServiceChannelVersioned, TOut> AddPhoneDefinition <TOut>(ITranslationDefinitions <ServiceChannelVersioned, TOut> definition) where TOut : IPhoneNumber { return(definition.AddPartial(input => input, output => output as IPhoneNumber)); }
public ITranslationDefinitions <TIn, ServiceChannelVersioned> AddPhoneDefinition <TIn>(ITranslationDefinitions <TIn, ServiceChannelVersioned> definition) where TIn : IPhoneNumber { return(definition.AddPartial <IPhoneNumber>(input => input)); }