Source/NFX/Security/Permissions.cs
/// <summary>
/// Makes multiple permissions from conf node
/// </summary>
Makes multiple permissions from conf node
Makes multiple permissions from conf node
public static IEnumerable<Permission> MultipleFromConf(IConfigSectionNode node,
                                                                  string shortNodeName = null,
                                                                  string typePattern = null
                                                                  )
           {
              if (node==null || !node.Exists) return Enumerable.Empty<Permission>();
              var result = new List<Permission>();
              foreach(var pnode in node.Children
                                       .Where(cn => cn.IsSameName(CONFIG_PERMISSION_SECTION) ||
                                                                  (shortNodeName.IsNotNullOrWhiteSpace() && cn.IsSameName(shortNodeName) )
                                             ))
                 result.Add( FactoryUtils.MakeUsingCtor<Permission>(pnode, typePattern) );
              return result;
           }
public static IEnumerable < Permission > MultipleFromConf ( IConfigSectionNode node , string shortNodeName = null , string typePattern = null ) { if ( node == null || ! node . Exists ) return Enumerable . Empty < Permission > ( ) ; var result = new List < Permission > ( ) ; foreach ( var pnode in node . Children . Where ( cn => cn . IsSameName ( CONFIG_PERMISSION_SECTION ) || ( shortNodeName . IsNotNullOrWhiteSpace ( ) && cn . IsSameName ( shortNodeName ) ) ) ) result . Add ( FactoryUtils . MakeUsingCtor < Permission > ( pnode , typePattern ) ) ; return result ; }
Makes multiple permissions from conf node
Makes multiple permissions from conf node
node
IConfigSectionNode
shortNodeName
string
typePattern
string