private static Lazy <T, TMetadata> ToLazyTM <T, TMetadata>(System.ComponentModel.Composition.Primitives.Export export) { Func <T> valueFactory = () => (T)export.Value; TMetadata metadata = System.ComponentModel.Composition.AttributedModelServices.GetMetadataView <TMetadata>(export.Metadata); return(new Lazy <T, TMetadata>(valueFactory, metadata)); }
/// <summary> /// Cria um Lazy para exportar o valor do membro. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="export"></param> /// <returns></returns> private static Lazy <T> ToLazyT <T>(System.ComponentModel.Composition.Primitives.Export export) { Func <T> valueFactory = () => (T)export.Value; return(new Lazy <T>(valueFactory)); }
public void ReleaseExport(System.ComponentModel.Composition.Primitives.Export export) { }