/// <summary>
        /// Initializes a new instance of the <see cref="MultiExportImport" /> class.
        /// </summary>
        public MultiExportImport()
        {
            FullName = "MultiExportImport";

            var builder = new ComponentInfoBuilder(GetTypeInfo());

            builder.AddPropertyExport(TypeDescriptor.Create <string>(), "Export");
            builder.AddPropertyExport(TypeDescriptor.Create <string>(), "Export2");

            builder.AddPropertyImport(TypeDescriptor.Create <string>(), "Import");
            builder.AddPropertyImport(TypeDescriptor.Create <string>(), "Import2");
            builder.AddExplicitCompositionPoint(Naming.Method(TypeInfo, Naming.CtorName, false));


            builder.AddSelfExport(false, FullName);
            builder.AddSelfExport(false, FullName);
            ComponentInfo = builder.BuildWithImplicitCtor();
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SelfStringExport" /> class.
        /// </summary>
        public SelfStringExport()
        {
            FullName = "SelfStringExport";
            var builder = new ComponentInfoBuilder(GetTypeInfo());

            builder.AddSelfExport(false, typeof(string).FullName);
            builder.SetImportingCtor(TypeDescriptor.Create <string>());
            ComponentInfo = builder.BuildWithImplicitCtor();
        }