Update() приватный Метод

private Update ( PermissionSetTriple psTriple, PermissionSetTriple &retTriple ) : bool
psTriple PermissionSetTriple
retTriple PermissionSetTriple
Результат bool
Пример #1
0
 private bool UpdatePermissions(PermissionSetTriple currentTriple, PermissionListSet pls)
 {
     if (pls != null)
     {
         if (pls.m_permSetTriples != null)
         {
             this.UpdateTripleListAndCreateNewTriple(currentTriple, pls.m_permSetTriples);
         }
         else
         {
             PermissionSetTriple psTriple = pls.m_firstPermSetTriple;
             PermissionSetTriple retTriple;
             if (currentTriple.Update(psTriple, out retTriple))
             {
                 return(true);
             }
             if (retTriple != null)
             {
                 this.EnsureTriplesListCreated();
                 this.m_permSetTriples.Add((object)retTriple);
             }
         }
     }
     else
     {
         this.UpdateTripleListAndCreateNewTriple(currentTriple, (ArrayList)null);
     }
     return(false);
 }
Пример #2
0
 private bool UpdatePermissions(PermissionSetTriple currentTriple, PermissionListSet pls)
 {
     if (pls != null)
     {
         if (pls.m_permSetTriples != null)
         {
             this.UpdateTripleListAndCreateNewTriple(currentTriple, pls.m_permSetTriples);
         }
         else
         {
             PermissionSetTriple triple2;
             PermissionSetTriple firstPermSetTriple = pls.m_firstPermSetTriple;
             if (currentTriple.Update(firstPermSetTriple, out triple2))
             {
                 return(true);
             }
             if (triple2 != null)
             {
                 this.EnsureTriplesListCreated();
                 this.m_permSetTriples.Add(triple2);
             }
         }
     }
     else
     {
         this.UpdateTripleListAndCreateNewTriple(currentTriple, null);
     }
     return(false);
 }
Пример #3
0
        [System.Security.SecurityCritical]  // auto-generated
        private bool UpdatePermissions(PermissionSetTriple currentTriple, PermissionListSet pls)
        {
            if (pls != null)
            {
                if (pls.m_permSetTriples != null)
                {
                    // DCS has an AGR List. So we need to add the AGR List
                    UpdateTripleListAndCreateNewTriple(currentTriple, pls.m_permSetTriples);
                }
                else
                {
                    // Common case: One AGR set

                    PermissionSetTriple tmp_psTriple = pls.m_firstPermSetTriple;
                    PermissionSetTriple retTriple;
                    // First try and update currentTriple. Return value indicates if we can stop construction
                    if (currentTriple.Update(tmp_psTriple, out retTriple))
                    {
                        return(true);
                    }
                    // If we got a non-null retTriple, what it means is that compression failed,
                    // and we now have 2 triples to deal with: retTriple and currentTriple.
                    // retTriple has to be appended first. then currentTriple.
                    if (retTriple != null)
                    {
                        EnsureTriplesListCreated();
                        // we just created a new triple...add the previous one (returned) to the list
                        m_permSetTriples.Add(retTriple);
                    }
                }
            }
            else
            {
                // pls can be null only outside the loop in CreateCompressedState
                UpdateTripleListAndCreateNewTriple(currentTriple, null);
            }


            return(false);
        }
Пример #4
0
        [System.Security.SecurityCritical]  // auto-generated 
        private bool UpdatePermissions(PermissionSetTriple currentTriple, PermissionListSet pls)
        { 
            if (pls != null)
            {
                if (pls.m_permSetTriples != null)
                { 
                    // DCS has an AGR List. So we need to add the AGR List
                    UpdateTripleListAndCreateNewTriple(currentTriple,pls.m_permSetTriples); 
                } 
                else
                { 
                    // Common case: One AGR set

                    PermissionSetTriple tmp_psTriple = pls.m_firstPermSetTriple;
                    PermissionSetTriple retTriple; 
                    // First try and update currentTriple. Return value indicates if we can stop construction
                    if (currentTriple.Update(tmp_psTriple, out retTriple)) 
                        return true; 
                    // If we got a non-null retTriple, what it means is that compression failed,
                    // and we now have 2 triples to deal with: retTriple and currentTriple. 
                    // retTriple has to be appended first. then currentTriple.
                    if (retTriple != null)
                    {
                        EnsureTriplesListCreated(); 
                        // we just created a new triple...add the previous one (returned) to the list
                        m_permSetTriples.Add(retTriple); 
                    } 
                }
            } 
            else
            {
                // pls can be null only outside the loop in CreateCompressedState
                UpdateTripleListAndCreateNewTriple(currentTriple, null); 
            }
 
 
            return false;
 
        }
 private bool UpdatePermissions(PermissionSetTriple currentTriple, PermissionListSet pls)
 {
     if (pls != null)
     {
         if (pls.m_permSetTriples != null)
         {
             this.UpdateTripleListAndCreateNewTriple(currentTriple, pls.m_permSetTriples);
         }
         else
         {
             PermissionSetTriple triple2;
             PermissionSetTriple firstPermSetTriple = pls.m_firstPermSetTriple;
             if (currentTriple.Update(firstPermSetTriple, out triple2))
             {
                 return true;
             }
             if (triple2 != null)
             {
                 this.EnsureTriplesListCreated();
                 this.m_permSetTriples.Add(triple2);
             }
         }
     }
     else
     {
         this.UpdateTripleListAndCreateNewTriple(currentTriple, null);
     }
     return false;
 }