mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-16 11:34:47 +02:00
generator: Implement Parameters using the generics class List<T>
A first step in the wonderful world of strong-typed collections. We don't need to limit ourselves to the old ways of the .NET 1.1 profile.
This commit is contained in:
parent
d467cce6e6
commit
f748be34c1
@ -24,11 +24,12 @@ namespace GtkSharp.Generation {
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
public class Parameters : IEnumerable {
|
public class Parameters : IEnumerable<Parameter> {
|
||||||
|
|
||||||
ArrayList param_list = new ArrayList ();
|
List<Parameter> param_list = new List<Parameter> ();
|
||||||
XmlElement elem;
|
XmlElement elem;
|
||||||
bool first_is_instance;
|
bool first_is_instance;
|
||||||
|
|
||||||
@ -61,7 +62,7 @@ namespace GtkSharp.Generation {
|
|||||||
|
|
||||||
public Parameter this [int idx] {
|
public Parameter this [int idx] {
|
||||||
get {
|
get {
|
||||||
return param_list [idx] as Parameter;
|
return param_list [idx];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,11 +139,16 @@ namespace GtkSharp.Generation {
|
|||||||
param_list = null;
|
param_list = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerator GetEnumerator ()
|
public IEnumerator<Parameter> GetEnumerator ()
|
||||||
{
|
{
|
||||||
return param_list.GetEnumerator ();
|
return param_list.GetEnumerator ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IEnumerator IEnumerable.GetEnumerator ()
|
||||||
|
{
|
||||||
|
return GetEnumerator ();
|
||||||
|
}
|
||||||
|
|
||||||
bool valid = false;
|
bool valid = false;
|
||||||
|
|
||||||
public bool Validate (LogWriter log)
|
public bool Validate (LogWriter log)
|
||||||
|
Loading…
Reference in New Issue
Block a user