public static ReflectionComposablePartDefinition CreatePartDefinition(Type type, PartCreationPolicyAttribute partCreationPolicy, bool ignoreConstructorImports, ICompositionElement origin) { Assumes.NotNull(type); AttributedPartCreationInfo creationInfo = new AttributedPartCreationInfo(type, partCreationPolicy, ignoreConstructorImports, origin); return new ReflectionComposablePartDefinition(creationInfo); }
public static ReflectionComposablePartDefinition CreatePartDefinition(Type type, PartCreationPolicyAttribute partCreationPolicy, bool ignoreConstructorImports, ICompositionElement origin) { Assumes.NotNull(type); AttributedPartCreationInfo creationInfo = new AttributedPartCreationInfo(type, partCreationPolicy, ignoreConstructorImports, origin); return(new ReflectionComposablePartDefinition(creationInfo)); }
public static ComposablePartDefinition CreatePartDefinitionIfDiscoverable(Type type, ICompositionElement origin) { AttributedPartCreationInfo creationInfo = new AttributedPartCreationInfo(type, null, false, origin); if (!creationInfo.IsPartDiscoverable()) { return null; } return new ReflectionComposablePartDefinition(creationInfo); }
public static ComposablePartDefinition CreatePartDefinitionIfDiscoverable(Type type, ICompositionElement origin) { AttributedPartCreationInfo creationInfo = new AttributedPartCreationInfo(type, null, false, origin); if (!creationInfo.IsPartDiscoverable()) { return(null); } return(new ReflectionComposablePartDefinition(creationInfo)); }
public static ReflectionComposablePartDefinition CreatePartDefinition(Type type, PartCreationPolicyAttribute partCreationPolicy, bool ignoreConstructorImports, ICompositionElement origin) { if (type == null) { throw new ArgumentNullException(nameof(type)); } AttributedPartCreationInfo creationInfo = new AttributedPartCreationInfo(type, partCreationPolicy, ignoreConstructorImports, origin); return(new ReflectionComposablePartDefinition(creationInfo)); }
public AttributedExportDefinition(AttributedPartCreationInfo partCreationInfo, MemberInfo member, ExportAttribute exportAttribute) : base(member.GetContractNameFromExport(exportAttribute), (IDictionary<string, object>)null) { Assumes.NotNull(partCreationInfo); Assumes.NotNull(member); Assumes.NotNull(exportAttribute); this._partCreationInfo = partCreationInfo; this._member = member; this._exportAttribute = exportAttribute; }
public AttributedExportDefinition(AttributedPartCreationInfo partCreationInfo, MemberInfo member, ExportAttribute exportAttribute) : base(member.GetContractNameFromExport(exportAttribute), (IDictionary <string, object>)null) { Assumes.NotNull(partCreationInfo); Assumes.NotNull(member); Assumes.NotNull(exportAttribute); this._partCreationInfo = partCreationInfo; this._member = member; this._exportAttribute = exportAttribute; }
public AttributedExportDefinition(AttributedPartCreationInfo partCreationInfo, MemberInfo member, ExportAttribute exportAttribute, Type?typeIdentityType, string contractName) : base(contractName, (IDictionary <string, object?>?)null) { ArgumentNullException.ThrowIfNull(partCreationInfo); ArgumentNullException.ThrowIfNull(member); ArgumentNullException.ThrowIfNull(exportAttribute); _partCreationInfo = partCreationInfo; _member = member; _exportAttribute = exportAttribute; _typeIdentityType = typeIdentityType; }
public AttributedExportDefinition(AttributedPartCreationInfo partCreationInfo, MemberInfo member, ExportAttribute exportAttribute, Type typeIdentityType, string contractName) : base(contractName, (IDictionary <string, object>)null) { Assumes.NotNull(partCreationInfo); Assumes.NotNull(member); Assumes.NotNull(exportAttribute); this._partCreationInfo = partCreationInfo; this._member = member; this._exportAttribute = exportAttribute; this._typeIdentityType = typeIdentityType; }
public AttributedExportDefinition(AttributedPartCreationInfo partCreationInfo, MemberInfo member, ExportAttribute exportAttribute, Type typeIdentityType, string contractName) : base(contractName, (IDictionary<string, object>)null) { Assumes.NotNull(partCreationInfo); Assumes.NotNull(member); Assumes.NotNull(exportAttribute); this._partCreationInfo = partCreationInfo; this._member = member; this._exportAttribute = exportAttribute; this._typeIdentityType = typeIdentityType; }
public AttributedExportDefinition(AttributedPartCreationInfo partCreationInfo, MemberInfo member, ExportAttribute exportAttribute, Type?typeIdentityType, string contractName) : base(contractName, (IDictionary <string, object?>?)null) { if (partCreationInfo == null) { throw new ArgumentNullException(nameof(partCreationInfo)); } if (member == null) { throw new ArgumentNullException(nameof(member)); } if (exportAttribute == null) { throw new ArgumentNullException(nameof(exportAttribute)); } _partCreationInfo = partCreationInfo; _member = member; _exportAttribute = exportAttribute; _typeIdentityType = typeIdentityType; }
public AttributedExportDefinition(AttributedPartCreationInfo partCreationInfo !!, MemberInfo member !!, ExportAttribute exportAttribute !!, Type?typeIdentityType, string contractName)