示例#1
0
        protected override object OnExecute(CommandContext context)
        {
            switch (context.Parameter)
            {
            case ISecretor secretor:
                this.Secretor = secretor;
                break;

            case ICache cache:
                this.Secretor = new Zongsoft.Security.Secretor(cache, ApplicationContext.Current.Services);
                break;
            }

            return(this.Secretor);
        }
示例#2
0
        protected override object OnExecute(CommandContext context)
        {
            switch (context.Parameter)
            {
            case ISecretor secretor:
                this.Secretor = secretor;
                break;

            case ICache cache:
                this.Secretor = Zongsoft.Security.Secretor.GetSecretor(cache);
                break;
            }

            return(this.Secretor);
        }