System.Security.Permissions.FileIOAccess.AddExpressions C# (CSharp) Method

AddExpressions() public method

public AddExpressions ( ArrayList values, bool checkForDuplicates ) : void
values System.Collections.ArrayList
checkForDuplicates bool
return void
        public void AddExpressions(ArrayList values, bool checkForDuplicates)
        {
            m_allFiles = false;
            m_set.AddExpressions(values, checkForDuplicates);
        }

Usage Example

Example #1
0
        internal void AddPathList(FileIOPermissionAccess access, String[] pathList, bool checkForDuplicates, bool needFullPath)
        {
            VerifyAccess(access);

            if (pathList == null)
            {
                throw new ArgumentNullException("pathList");
            }
            if (pathList.Length == 0)
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_EmptyPath"));
            }

            HasIllegalCharacters(pathList);

            m_unrestricted = false;

            if ((access & FileIOPermissionAccess.Read) != 0)
            {
                if (m_read == null)
                {
                    m_read = new FileIOAccess();
                }
                m_read.AddExpressions(pathList, checkForDuplicates, needFullPath);
            }

            if ((access & FileIOPermissionAccess.Write) != 0)
            {
                if (m_write == null)
                {
                    m_write = new FileIOAccess();
                }
                m_write.AddExpressions(pathList, checkForDuplicates, needFullPath);
            }

            if ((access & FileIOPermissionAccess.Append) != 0)
            {
                if (m_append == null)
                {
                    m_append = new FileIOAccess();
                }
                m_append.AddExpressions(pathList, checkForDuplicates, needFullPath);
            }

            if ((access & FileIOPermissionAccess.PathDiscovery) != 0)
            {
                if (m_pathDiscovery == null)
                {
                    m_pathDiscovery = new FileIOAccess(true);
                }
                m_pathDiscovery.AddExpressions(pathList, checkForDuplicates, needFullPath);
            }
        }
All Usage Examples Of System.Security.Permissions.FileIOAccess::AddExpressions