Esempio n. 1
0
        public static Permission Parse(CommandParameterGroup currentParameterGroup, CommandParameterGroup firstParameterGroup)
        {
            if (currentParameterGroup == null)
                throw new ArgumentNullException("currentParameterGroup");

            return new Permission
            {
                Id = currentParameterGroup.GetParameter("permid") == null ? 0 : currentParameterGroup.GetParameterValue<uint>("permid"),
                Name = currentParameterGroup.GetParameterValue("permsid"),
                Value = currentParameterGroup.GetParameterValue<int>("permvalue"),
                Negated = currentParameterGroup.GetParameterValue("permnegated") == "1",
                Skip = currentParameterGroup.GetParameterValue("permskip") == "1"
            };
        }
Esempio n. 2
0
        public static Permission Parse(CommandParameterGroup currentParameterGroup, CommandParameterGroup firstParameterGroup)
        {
            if (currentParameterGroup == null)
                throw new ArgumentNullException("currentParameterGroup");

            return new Permission
            {
                Id = currentParameterGroup.GetParameter("permid") == null ? 0 : currentParameterGroup.GetParameterValue<uint>("permid"),
                Name = currentParameterGroup.GetParameterValue("permsid"),
                Value = currentParameterGroup.GetParameterValue<int>("permvalue"),
                Negated = currentParameterGroup.GetParameterValue("permnegated") == "1",
                Skip = currentParameterGroup.GetParameterValue("permskip") == "1"
            };
        }
Esempio n. 3
0
        Permission IEntity <Permission> .ApplyFrom(CommandParameterGroup currentParameterGroup, CommandParameterGroup firstParameterGroup)
        {
            if (currentParameterGroup == null)
            {
                throw new ArgumentNullException(nameof(currentParameterGroup));
            }

            Id      = currentParameterGroup.GetParameter("permid") == null ? 0 : currentParameterGroup.GetParameterValue <uint>("permid");
            Name    = currentParameterGroup.GetParameterValue("permsid");
            Value   = currentParameterGroup.GetParameterValue <int>("permvalue");
            Negated = currentParameterGroup.GetParameterValue("permnegated") == "1";
            Skip    = currentParameterGroup.GetParameterValue("permskip") == "1";

            return(this);
        }