本文整理汇总了C#中System.Xml.XmlElement.GetAttributeAsBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# XmlElement.GetAttributeAsBoolean方法的具体用法?C# XmlElement.GetAttributeAsBoolean怎么用?C# XmlElement.GetAttributeAsBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.XmlElement
的用法示例。
在下文中一共展示了XmlElement.GetAttributeAsBoolean方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ClassBase
protected ClassBase (XmlElement ns, XmlElement elem) : base (ns, elem) {
deprecated = elem.GetAttributeAsBoolean ("deprecated");
isabstract = elem.GetAttributeAsBoolean ("abstract");
foreach (XmlNode node in elem.ChildNodes) {
if (!(node is XmlElement)) continue;
XmlElement member = (XmlElement) node;
if (member.GetAttributeAsBoolean ("hidden"))
continue;
string name;
switch (node.Name) {
case "method":
name = member.GetAttribute("name");
while (methods.ContainsKey(name))
name += "mangled";
methods.Add (name, new Method (member, this));
break;
case "property":
name = member.GetAttribute("name");
while (props.ContainsKey(name))
name += "mangled";
props.Add (name, new Property (member, this));
break;
case "field":
name = member.GetAttribute("name");
while (fields.ContainsKey (name))
name += "mangled";
fields.Add (name, new ObjectField (member, this));
break;
case "implements":
ParseImplements (member);
break;
case "constructor":
ctors.Add (new Ctor (member, this));
break;
case "constant":
name = member.GetAttribute ("name");
constants.Add (name, new Constant (member));
break;
default:
break;
}
}
}
示例2: ReturnValue
public ReturnValue(XmlElement elem)
{
if (elem != null) {
is_null_term = elem.GetAttributeAsBoolean ("null_term_array");
is_array = elem.GetAttributeAsBoolean ("array") || elem.HasAttribute ("array_length_param");
array_length_param = elem.GetAttribute ("array_length_param");
elements_owned = elem.GetAttributeAsBoolean ("elements_owned");
owned = elem.GetAttributeAsBoolean ("owned");
ctype = elem.GetAttribute("type");
default_value = elem.GetAttribute ("default_value");
element_ctype = elem.GetAttribute ("element_type");
}
}
示例3: Method
public Method (XmlElement elem, ClassBase container_type) : base (elem, container_type)
{
this.retval = new ReturnValue (elem["return-type"]);
if (!container_type.IsDeprecated) {
deprecated = elem.GetAttributeAsBoolean ("deprecated");
}
win32_utf8_variant = elem.GetAttributeAsBoolean ("win32_utf8_variant");
if (Name == "GetType")
Name = "GetGType";
}
示例4: Ctor
public Ctor (XmlElement elem, ClassBase implementor) : base (elem, implementor)
{
preferred = elem.GetAttributeAsBoolean ("preferred");
if (implementor is ObjectGen)
needs_chaining = true;
name = implementor.Name;
}
示例5: InterfaceGen
public InterfaceGen (XmlElement ns, XmlElement elem) : base (ns, elem, true)
{
consume_only = elem.GetAttributeAsBoolean ("consume_only");
foreach (XmlNode node in elem.ChildNodes) {
if (!(node is XmlElement)) continue;
XmlElement member = (XmlElement) node;
switch (member.Name) {
case "signal":
object sig = sigs [member.GetAttribute ("name")];
if (sig == null)
sig = new Signal (node as XmlElement, this);
break;
default:
if (!base.IsNodeNameHandled (node.Name))
new LogWriter (QualifiedName).Warn ("Unexpected node " + node.Name);
break;
}
}
}
示例6: MethodBase
protected MethodBase (XmlElement elem, ClassBase container_type)
{
this.elem = elem;
this.container_type = container_type;
this.name = elem.GetAttribute ("name");
parms = new Parameters (elem ["parameters"]);
IsStatic = elem.GetAttribute ("shared") == "true";
if (elem.GetAttributeAsBoolean ("new_flag"))
mods = "new ";
if (elem.HasAttribute ("accessibility")) {
string attr = elem.GetAttribute ("accessibility");
switch (attr) {
case "public":
case "protected":
case "internal":
case "private":
case "protected internal":
protection = attr;
break;
}
}
}
示例7: AddVM
VirtualMethod AddVM(XmlElement vm_elem, bool is_signal_vm, bool is_interface)
{
VirtualMethod vm;
if (is_signal_vm)
vm = new DefaultSignalHandler (vm_elem, this);
else if (is_interface) {
string target_name = vm_elem.HasAttribute ("target_method") ? vm_elem.GetAttribute ("target_method") : vm_elem.GetAttribute ("name");
vm = new InterfaceVM (vm_elem, methods [target_name] as Method, this);
} else
vm = new GObjectVM (vm_elem, this);
if (vm_elem.GetAttributeAsBoolean ("padding") || vm_elem.GetAttributeAsBoolean ("hidden"))
hidden_vms.Add (vm);
else {
if (vm is GObjectVM)
virtual_methods.Add (vm);
else
interface_vms.Add (vm);
}
if (vm.CName != "")
class_members.Add (vm);
return vm;
}
示例8: ArrayParameter
public ArrayParameter(XmlElement elem)
: base(elem)
{
null_terminated = elem.GetAttributeAsBoolean ("null_term_array");
}
示例9: ArrayParameter
public ArrayParameter (XmlElement elem) : base (elem)
{
null_terminated = elem.GetAttributeAsBoolean ("null_term_array");
if (elem.HasAttribute ("array_len"))
FixedArrayLength = Int32.Parse (elem.GetAttribute ("array_len"));
}