Ejemplo n.º 1
0
 /// <summary>
 /// Construtor padrão.
 /// </summary>
 /// <param name="member"></param>
 /// <param name="importDescription"></param>
 /// <param name="creationPolicy">Política de criação.</param>
 public ProviderImportDefinition(Lazy <MemberInfo> member, ImportDescription importDescription, System.ComponentModel.Composition.CreationPolicy creationPolicy) : base(CompositionServices.GetContractNameFromImportDescription(member, importDescription), CompositionServices.GetTypeIdentityFromImportDescription(member, importDescription), CompositionServices.GetMetadataFromImportDescription(member, importDescription), GetCardinality(member, importDescription.AllowDefault), importDescription.Recomposable, importDescription.Prerequisite, creationPolicy)
 {
     member.Require("member").NotNull();
     importDescription.Require("importDescription").NotNull();
     this.AllowDefault = importDescription.AllowDefault;
     _member           = member;
 }
 /// <summary>
 /// Construtor padrão.
 /// </summary>
 /// <param name="parameter"></param>
 /// <param name="importDescription"></param>
 /// <param name="creationPolicy"></param>
 public ProviderParameterImportDefinition(System.Reflection.ParameterInfo parameter, ImportDescription importDescription, System.ComponentModel.Composition.CreationPolicy creationPolicy) : base(CompositionServices.GetContractNameFromImportDescription(parameter, importDescription), CompositionServices.GetTypeIdentityFromImportDescription(parameter, importDescription), CompositionServices.GetMetadataFromImportDescription(parameter, importDescription), System.ComponentModel.Composition.Primitives.ImportCardinality.ExactlyOne, importDescription.Recomposable, importDescription.Prerequisite, creationPolicy)
 {
     parameter.Require("parameter").NotNull();
     importDescription.Require("importDescription").NotNull();
     this.AllowDefault = importDescription.AllowDefault;
     this.Parameter    = parameter;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Construtor padrão.
 /// </summary>
 /// <param name="memberGetter">Referencia do método usado para recuperar o membro.</param>
 /// <param name="exportDescription"></param>
 /// <param name="creationPolicy">Política de criação.</param>
 public ProviderExportDefinition(Func <System.Reflection.MemberInfo> memberGetter, ExportDescription exportDescription, System.ComponentModel.Composition.CreationPolicy creationPolicy) : base(CompositionServices.GetContractNameFromExportDescription(memberGetter, exportDescription), CompositionServices.GetMetadataFromExportDescription(memberGetter, exportDescription, creationPolicy))
 {
     memberGetter.Require("member").NotNull();
     exportDescription.Require("exportDescription").NotNull();
     _memberGetter = memberGetter;
 }