1 Star 0 Fork 0

demo / MefDemo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
EnBook.cs 662 Bytes
一键复制 编辑 原始数据 按行查看 历史
liuxiaopei 提交于 2020-05-16 19:25 . add:first commit
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MefDemo
{
[Export("en",typeof(IBook))]
public class EnBook : IBook
{
public string description { get; set ; }
public int index { get; set; }
public EnBook()
{
index = 0;
description = "english book";
Console.WriteLine("create instance en");
}
public void SayHi()
{
index++;
Console.WriteLine(description+" "+index);
}
}
}
C#
1
https://gitee.com/liuxp_demo/MefDemo.git
git@gitee.com:liuxp_demo/MefDemo.git
liuxp_demo
MefDemo
MefDemo
master

搜索帮助