示例#1
0
        /// <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();
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StringExport2"/> class.
        /// </summary>
        public StringExport2()
        {
            FullName = "StringExport2";

            var builder = new ComponentInfoBuilder(GetTypeInfo());

            builder.AddPropertyExport(TypeDescriptor.Create <string>(), "Export");
            ComponentInfo = builder.BuildWithImplicitCtor();
        }
示例#3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StringMetaExport"/> class.
        /// </summary>
        public StringMetaExport()
        {
            FullName = "StringMetaExport";

            var builder = new ComponentInfoBuilder(GetTypeInfo());

            builder.AddMeta("Key1", "Exported metadata1", true);
            builder.AddMeta("Key1", "Exported metadata2", true);
            builder.AddPropertyExport(TypeDescriptor.Create <string>(), "Export");
            builder.AddExplicitCompositionPoint(Naming.Method(TypeInfo, Naming.CtorName, false));

            ComponentInfo = builder.BuildWithImplicitCtor();
        }