что является заменой для TypeRegistration и ContainerModel в EnterpriseLibrary 6 - PullRequest
0 голосов
/ 31 октября 2018

Мы использовали EnterpriseLibrary 5 в нашем проекте,

using Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel;


public class Sampleclass<T> : SampleClassBase where T: IMyCache, new()
    public override IEnumerable<TypeRegistration> GetRegistrations(IConfigurationSource configurationSource)
    {
        yield return
          new TypeRegistration<IMyCache>(
            () => new T())
          {
              Name = this.Name,
              Lifetime = TypeRegistrationLifetime.Transient
          };
    }

После обновления до EnterpriseLibrary 6 мы начали видеть, что ContainerModel, TypeRegistration и TypeRegistrationLifetime отсутствуют в библиотеке.

Поскольку я новичок в этой библиотеке, ContainerModel упоминается во многих местах нашего проекта, а в EnterpriseLibrary 6 ContainerModel удалено / отсутствует. мы ищем альтернативное решение для достижения того же, используя EnterpriseLibrary 6. Заранее спасибо.

...