示例#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="StringImport"/> class.
        /// </summary>
        public StringImport()
        {
            FullName = "StringImport";

            var builder = new ComponentInfoBuilder(GetTypeInfo());

            builder.AddPropertyImport(TypeDescriptor.Create <string>(), "Import");
            builder.SetImportingCtor();

            ComponentInfo = builder.BuildWithImplicitCtor();
        }
示例#3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LazyStringMetaImport"/> class.
        /// </summary>
        public LazyStringMetaImport()
        {
            FullName = "LazyStringMetaImport";

            var builder = new ComponentInfoBuilder(GetTypeInfo());

            builder.AddPropertyImport(TypeDescriptor.Create("System.Lazy<System.String,MetaInterface>"), "Import");
            builder.SetImportingCtor();

            ComponentInfo = builder.BuildWithImplicitCtor();
        }