ToType() 공개 메소드

public ToType ( ) : Type
리턴 Type
예제 #1
0
파일: TestRental.cs 프로젝트: JazzCF/BA_CF
    //public DTypeInfo GetInterface (string iface)
    public DArgumentInfo[] GetFields(string iface)
    {
        DTypeInfo dti      = new DTypeInfo(iface);
        Type      declType = dti.ToType();

        List <DArgumentInfo> fields = new List <DArgumentInfo>();

        foreach (FieldInfo fi in declType.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly))
        {
            fields.Add(new DArgumentInfo(fi.Name, new DTypeInfo(fi.FieldType.FullName)));
        }

        //return dti;
        return(fields.ToArray());
    }
예제 #2
0
파일: TestRental.cs 프로젝트: JazzCF/BA_CF
    public DynamicMethod GetDM()
    {
        List <Type> parms = new List <Type>();

        parms.Add(typeof(object));
        foreach (DTypeInfo dti in Parameters)
        {
            parms.Add(dti.ToType());
        }

        DynamicMethod dm = new DynamicMethod(Name, ReturnType.ToType(), parms.ToArray(), typeof(DemoBase));

        ILGenerator ilg = dm.GetILGenerator();

        Implement(ilg);
        return(dm);
    }
예제 #3
0
	//public DTypeInfo GetInterface (string iface)
	public DArgumentInfo[] GetFields (string iface)
	{
		DTypeInfo dti = new DTypeInfo (iface);
		Type declType = dti.ToType();

		List<DArgumentInfo> fields = new List<DArgumentInfo>();
		foreach (FieldInfo fi in declType.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly))
			fields.Add (new DArgumentInfo(fi.Name, new DTypeInfo(fi.FieldType.FullName)));

		//return dti;
		return fields.ToArray();
	}