示例#1
0
        public static StaticLicenseProvider One(string license)
        {
            var p = new StaticLicenseProvider();

            p.AddLicense(license);
            return(p);
        }
示例#2
0
        public IPlugin Install(Configuration.Config c)
        {
            foreach (var child in c.getNode("licenses")?
                     .childrenByName("license")
                     .Where(n => !string.IsNullOrWhiteSpace(n.TextContents)) ?? Enumerable.Empty <Node>())
            {
                licenses.Add(StaticLicenseProvider.CleanupLicenseString(child.TextContents));
            }

            c.Plugins.add_plugin(this);
            return(this);
        }