IsSubsetOf() публичный Метод

public IsSubsetOf ( FileIOAccess operand ) : bool
operand FileIOAccess
Результат bool
        public override bool Equals(object obj)
        {
            FileIOAccess fileIOAccess = obj as FileIOAccess;

            if (fileIOAccess == null)
            {
                return(this.IsEmpty() && obj == null);
            }
            if (this.m_pathDiscovery)
            {
                return((this.m_allFiles && fileIOAccess.m_allFiles) || (this.m_allLocalFiles == fileIOAccess.m_allLocalFiles && this.m_set.IsSubsetOf(fileIOAccess.m_set) && fileIOAccess.m_set.IsSubsetOf(this.m_set)));
            }
            return(this.IsSubsetOf(fileIOAccess) && fileIOAccess.IsSubsetOf(this));
        }
Пример #2
0
        public override bool Equals(object obj)
        {
            FileIOAccess operand = obj as FileIOAccess;

            if (operand == null)
            {
                if (this.IsEmpty())
                {
                    return(obj == null);
                }
                return(false);
            }
            if (this.m_pathDiscovery)
            {
                return(this.m_allFiles && operand.m_allFiles || this.m_allLocalFiles == operand.m_allLocalFiles && this.m_set.IsSubsetOf(operand.m_set) && operand.m_set.IsSubsetOf(this.m_set));
            }
            return(this.IsSubsetOf(operand) && operand.IsSubsetOf(this));
        }
Пример #3
0
        [System.Security.SecuritySafeCritical]  // auto-generated
        public override bool Equals(Object obj)
        {
            FileIOAccess operand = obj as FileIOAccess;

            if (operand == null)
            {
                return(IsEmpty() && obj == null);
            }
            Contract.Assert(this.m_pathDiscovery == operand.m_pathDiscovery, "Path discovery settings must match");
            if (m_pathDiscovery)
            {
                if (this.m_allFiles && operand.m_allFiles)
                {
                    return(true);
                }
                if (this.m_allLocalFiles == operand.m_allLocalFiles &&
                    m_set.IsSubsetOf(operand.m_set) &&
                    operand.m_set.IsSubsetOf(m_set)) // Watch Out: This calls StringExpressionSet.IsSubsetOf, unlike below
                {
                    return(true);
                }
                return(false);
            }
            else
            {
                if (!this.IsSubsetOf(operand)) // Watch Out: This calls FileIOAccess.IsSubsetOf, unlike above
                {
                    return(false);
                }
                if (!operand.IsSubsetOf(this))
                {
                    return(false);
                }
                return(true);
            }
        }
 private bool IsAssemblyUnderAppBase()
 {
     string location = this.Location;
     if (string.IsNullOrEmpty(location))
     {
         return true;
     }
     FileIOAccess access = new FileIOAccess(Path.GetFullPathInternal(location));
     FileIOAccess operand = new FileIOAccess(Path.GetFullPathInternal(AppDomain.CurrentDomain.BaseDirectory));
     return access.IsSubsetOf(operand);
 }