Skip to content

C# generic component part of the code from the network, but made some of the package, plug-in module code is mainly from Egeye.Plugin。

License

Notifications You must be signed in to change notification settings

xianran0411/CSharp-AddIn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSharp-AddIn

C# generic component part of the code from the network, but made some of the package, plug-in module code is mainly from Egeye.Plugin Because the project used to related components Syncfusion. So put the current program named Syncfusion.Addin. The main component is a plug-in module。

plguin xml

plugin class

[Serializable]
[AddIn("Activator2")]
public class Activator2 : AddInBase
{
    public override void Start(IBundleContext context)
    {
        Console.WriteLine("Plugin2 is Starting!!!!");

        IUserInfo userinfo = new UserInfo();
        userinfo.GetUserName();
        userinfo.userName = "Admin";
        
        context.RegisterService(typeof(IUserInfo), userinfo, user);
        context.RegisterService(typeof (Form), new Form1(), null);  
        IUserInfo _userinfo = (IUserInfo)context.GetRegisterService(typeof(IUserInfo));
        if (_userinfo != null)
        {
            foreach (string str in _userinfo.GetUserName())
            {
                Console.WriteLine(str);
            }
        }
     var ufbio=   context.GetRegisterService(typeof(UserInfo));
    }

    public override void Stop(IBundleContext context)
    {
        Console.WriteLine("Plugin2 is Stoped!!!");
    }
}

About

C# generic component part of the code from the network, but made some of the package, plug-in module code is mainly from Egeye.Plugin。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.9%
  • Batchfile 0.1%