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" }; }
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" }; }
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); }