/// <summary> /// Sets the attribute presence declaration. /// </summary> /// <param name="token"> /// The string representation of the attribute presence, corresponding to one of the values in the /// <see /// cref="AttributePresence" /> /// enumeration. /// </param> /// <returns>true if the attribute presence implies the element has a default value.</returns> public bool SetPresence(string token) { var hasDefault = true; if (string.Equals(token, "FIXED", StringComparison.OrdinalIgnoreCase)) { m_presence = AttributePresence.Fixed; } else if (string.Equals(token, "REQUIRED", StringComparison.OrdinalIgnoreCase)) { m_presence = AttributePresence.Required; hasDefault = false; } else if (string.Equals(token, "IMPLIED", StringComparison.OrdinalIgnoreCase)) { m_presence = AttributePresence.Implied; hasDefault = false; } else { throw new SgmlParseException(string.Format(CultureInfo.CurrentUICulture, "Attribute value '{0}' not supported", token)); } return(hasDefault); }
public bool SetPresence(string token) { bool flag = true; if (token == "FIXED") { this.Presence = AttributePresence.FIXED; return flag; } if (token == "REQUIRED") { this.Presence = AttributePresence.REQUIRED; return false; } if (token != "IMPLIED") { throw new Exception(string.Format("Attribute value '{0}' not supported", token)); } this.Presence = AttributePresence.IMPLIED; return false; }
public bool SetPresence(string token) { bool flag = true; if (token == "FIXED") { this.Presence = AttributePresence.FIXED; return(flag); } if (token == "REQUIRED") { this.Presence = AttributePresence.REQUIRED; return(false); } if (token != "IMPLIED") { throw new Exception(string.Format("Attribute value '{0}' not supported", token)); } this.Presence = AttributePresence.IMPLIED; return(false); }
public bool method_8(string A_0) { int num = 5; bool flag = true; if (string.Equals(A_0, BookmarkStart.b("洪搬眮琰眲", 5), StringComparison.OrdinalIgnoreCase)) { this.attributePresence_0 = AttributePresence.Fixed; return(flag); } if (string.Equals(A_0, BookmarkStart.b("礪栬縮搰稲朴父紸", num), StringComparison.OrdinalIgnoreCase)) { this.attributePresence_0 = AttributePresence.Required; return(false); } if (!string.Equals(A_0, BookmarkStart.b("截怬缮細稲瀴猶", num), StringComparison.OrdinalIgnoreCase)) { throw new Exception1(string.Format(CultureInfo.CurrentUICulture, BookmarkStart.b("横夬嬮䌰娲圴䈶䴸帺ᴼ䤾⁀⽂い≆楈汊㙌罎ⱐ瑒畔㥖㙘⽚絜ⱞᑠ።ᕤࡦ᭨Ὢ୮", num), new object[] { A_0 })); } this.attributePresence_0 = AttributePresence.Implied; return(false); }
public bool SetPresence(string token) { bool hasDefault = true; if (token == "FIXED") { Presence = AttributePresence.FIXED; } else if (token == "REQUIRED") { Presence = AttributePresence.REQUIRED; hasDefault = false; } else if (token == "IMPLIED") { Presence = AttributePresence.IMPLIED; hasDefault = false; } else { throw new Exception(String.Format("Attribute value '{0}' not supported", token)); } return hasDefault; }
/// <summary> /// Sets the attribute presence declaration. /// </summary> /// <param name="token">The string representation of the attribute presence, /// corresponding to one of the values in the <see cref="AttributePresence"/> enumeration.</param> /// <returns>true if the attribute presence implies the /// element has a default value.</returns> public bool SetPresence(string token) { if (String.Equals(token, "FIXED", StringComparison.InvariantCultureIgnoreCase)) { _presence = AttributePresence.Fixed; return(true); } else if (String.Equals(token, "REQUIRED", StringComparison.InvariantCultureIgnoreCase)) { _presence = AttributePresence.Required; return(false); } else if (String.Equals(token, "IMPLIED", StringComparison.InvariantCultureIgnoreCase)) { _presence = AttributePresence.Implied; return(false); } throw Error.InvalidAttributeDefinitionPresenceValue(token); }
/// <summary> /// Sets the attribute presence declaration. /// </summary> /// <param name="token">The string representation of the attribute presence, corresponding to one of the values in the <see cref="AttributePresence"/> enumeration.</param> /// <returns>true if the attribute presence implies the element has a default value.</returns> public bool SetPresence(string token) { bool hasDefault = true; if (string.Equals(token, "FIXED", StringComparison.OrdinalIgnoreCase)) { m_presence = AttributePresence.Fixed; } else if (string.Equals(token, "REQUIRED", StringComparison.OrdinalIgnoreCase)) { m_presence = AttributePresence.Required; hasDefault = false; } else if (string.Equals(token, "IMPLIED", StringComparison.OrdinalIgnoreCase)) { m_presence = AttributePresence.Implied; hasDefault = false; } else { throw new SgmlParseException(string.Format(CultureInfo.CurrentUICulture, "Attribute value '{0}' not supported", token)); } return hasDefault; }
/// <summary> /// Sets the attribute presence declaration. /// </summary> /// <param name="token">The string representation of the attribute presence, corresponding to one of the values in the <see cref="AttributePresence"/> enumeration.</param> /// <returns>true if the attribute presence implies the element has a default value.</returns> public bool SetPresence(string token) { bool hasDefault = true; if (string.Compare(token, "FIXED", true, CultureInfo.InvariantCulture) == 0) { m_presence = AttributePresence.Fixed; } else if (string.Compare(token, "REQUIRED", true, CultureInfo.InvariantCulture) == 0) { m_presence = AttributePresence.Required; hasDefault = false; } else if (string.Compare(token, "IMPLIED", true, CultureInfo.InvariantCulture) == 0) { m_presence = AttributePresence.Implied; hasDefault = false; } else { throw new SgmlParseException(String.Format(CultureInfo.CurrentUICulture, "Attribute value '{0}' not supported", token)); } return hasDefault; }
/// <summary> /// Sets the attribute presence declaration. /// </summary> /// <param name="token">The string representation of the attribute presence, /// corresponding to one of the values in the <see cref="AttributePresence"/> enumeration.</param> /// <returns>true if the attribute presence implies the /// element has a default value.</returns> public bool SetPresence(string token) { if (String.Equals(token, "FIXED", StringComparison.InvariantCultureIgnoreCase)) { _presence = AttributePresence.Fixed; return true; } else if (String.Equals(token, "REQUIRED", StringComparison.InvariantCultureIgnoreCase)) { _presence = AttributePresence.Required; return false; } else if (String.Equals(token, "IMPLIED", StringComparison.InvariantCultureIgnoreCase)) { _presence = AttributePresence.Implied; return false; } throw Error.InvalidAttributeDefinitionPresenceValue(token); }