Пример #1
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();
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ManyStringImport"/> class.
        /// </summary>
        public ManyStringImport()
        {
            FullName = "ManyStringImport";

            var builder    = new ComponentInfoBuilder(GetTypeInfo());
            var stringInfo = TypeDescriptor.Create <string>();
            var manyInfo   = TypeDescriptor.Create <string[]>();

            builder.AddManyImport(manyInfo, stringInfo, "Import");
            ComponentInfo = builder.BuildWithImplicitCtor();
        }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SimpleStringExport"/> class.
        /// </summary>
        public SimpleStringExport()
        {
            FullName = "SimpleStringExport";

            var builder = new ComponentInfoBuilder(GetTypeInfo());

            builder.AddPropertyExport(TypeDescriptor.Create <string>(), "Export");
            builder.AddExplicitCompositionPoint(Naming.Method(TypeInfo, Naming.CtorName, false));

            ComponentInfo = builder.BuildWithImplicitCtor();
        }
Пример #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LazyStringImport"/> class.
        /// </summary>
        public LazyStringImport()
        {
            FullName = "LazyStringImport";

            var builder = new ComponentInfoBuilder(GetTypeInfo());

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

            ComponentInfo = builder.BuildWithImplicitCtor();
        }