Пример #1
0
 private bool ParseMembershipCondition(bool safeLoad)
 {
     lock (this)
     {
         SecurityElement local_3 = this.m_element.SearchForChildByTag("IMembershipCondition");
         if (local_3 == null)
         {
             throw new ArgumentException(string.Format((IFormatProvider)CultureInfo.CurrentCulture, Environment.GetResourceString("Argument_InvalidXMLElement"), (object)"IMembershipCondition", (object)this.GetType().FullName));
         }
         IMembershipCondition local_2_1;
         try
         {
             local_2_1 = XMLUtil.CreateMembershipCondition(local_3);
             if (local_2_1 == null)
             {
                 return(false);
             }
         }
         catch (Exception exception_0)
         {
             throw new ArgumentException(Environment.GetResourceString("Argument_MembershipConditionElement"), exception_0);
         }
         local_2_1.FromXml(local_3, this.m_parentLevel);
         this.m_membershipCondition = local_2_1;
         return(true);
     }
 }
Пример #2
0
 private bool ParseMembershipCondition(bool safeLoad)
 {
     lock (this)
     {
         IMembershipCondition condition = null;
         SecurityElement      el        = this.m_element.SearchForChildByTag("IMembershipCondition");
         if (el == null)
         {
             throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Argument_InvalidXMLElement"), new object[] { "IMembershipCondition", base.GetType().FullName }));
         }
         try
         {
             condition = XMLUtil.CreateMembershipCondition(el);
             if (condition == null)
             {
                 return(false);
             }
         }
         catch (Exception exception)
         {
             throw new ArgumentException(Environment.GetResourceString("Argument_MembershipConditionElement"), exception);
         }
         condition.FromXml(el, this.m_parentLevel);
         this.m_membershipCondition = condition;
         return(true);
     }
 }
Пример #3
0
        private bool ParseMembershipCondition(bool safeLoad)
        {
            bool result;

            lock (this)
            {
                IMembershipCondition membershipCondition = null;
                SecurityElement      securityElement     = this.m_element.SearchForChildByTag("IMembershipCondition");
                if (securityElement == null)
                {
                    throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Argument_InvalidXMLElement"), "IMembershipCondition", base.GetType().FullName));
                }
                try
                {
                    membershipCondition = XMLUtil.CreateMembershipCondition(securityElement);
                    if (membershipCondition == null)
                    {
                        return(false);
                    }
                }
                catch (Exception innerException)
                {
                    throw new ArgumentException(Environment.GetResourceString("Argument_MembershipConditionElement"), innerException);
                }
                membershipCondition.FromXml(securityElement, this.m_parentLevel);
                this.m_membershipCondition = membershipCondition;
                result = true;
            }
            return(result);
        }