Esempio n. 1
0
 private bool GetField(string field, string name, FieldNotFound fail = null)
 {
     if (IsObject)
     {
         int index = keys.IndexOf(name);
         if (index >= 0)
         {
             field = list[index].str;
             return(true);
         }
     }
     if (fail != null)
     {
         fail.Invoke(name);
     }
     return(false);
 }
Esempio n. 2
0
 public bool GetField(ref long field, string name, FieldNotFound fail = null)
 {
     if (IsObject)
     {
         int index = keys.IndexOf(name);
         if (index >= 0)
         {
             field = (long)list[index].n;
             return(true);
         }
     }
     if (fail != null)
     {
         fail.Invoke(name);
     }
     return(false);
 }
Esempio n. 3
0
 public bool GetField(ref bool field, string name, FieldNotFound fail = null)
 {
     if (type == Type.OBJECT)
     {
         int index = keys.IndexOf(name);
         if (index >= 0)
         {
             field = list[index].b;
             return(true);
         }
     }
     if (fail != null)
     {
         fail.Invoke(name);
     }
     return(false);
 }
Esempio n. 4
0
    public void GetField(ref double field, string name, FieldNotFound fail = null)
    {
#endif
        if (type == JSONObject.Type.OBJECT)
        {
            int index = keys.IndexOf(name);
            if (index >= 0)
            {
                field = list[index].n;
                return;
            }
        }
        if (fail != null)
        {
            fail.Invoke(name);
        }
    }
Esempio n. 5
0
    //#if USEFLOAT
    public void GetField(ref float field, string name, FieldNotFound fail = null)
    {
//#else
//public void GetField(ref double field, string name, FieldNotFound fail = null) {
//#endif
        if (type == Type.OBJECT)
        {
            int index = keys.IndexOf(name);
            if (index >= 0)
            {
                field = list [index].f;
                return;
            }
        }
        if (fail != null)
        {
            fail.Invoke(name);
        }
    }
Esempio n. 6
0
 public bool GetField(ref string field, string name, FieldNotFound fail = null)
 {
     if (IsObject)
     {
         int index = keys.IndexOf(name);
         if (index >= 0)
         {
             field = list[index].str;
             return true;
         }
     }
     if (fail != null)
         fail.Invoke(name);
     return false;
 }
Esempio n. 7
0
	public bool GetField(ref double field, string name, FieldNotFound fail = null) {
#endif
        if (type == Type.OBJECT)
        {
            int index = keys.IndexOf(name);
            if (index >= 0)
            {
                field = list[index].n;
                return true;
            }
        }
        if (fail != null)
            fail.Invoke(name);
        return false;
    }
Esempio n. 8
0
 public bool GetField(ref float field, string name, FieldNotFound fail = null)
 {
Esempio n. 9
0
 public void GetField(ref float field, string name, FieldNotFound fail)
 {
Esempio n. 10
0
	public void GetField (string name, GetFieldResponse response, FieldNotFound fail) 
	{
		if (response != null && type == JSONType.OBJECT) 
		{
			int index = keys.IndexOf(name);
			if (index >= 0) 
			{
				response.Invoke(list[index]);
				return;
			}
		}
		if(fail != null) 
		{
			fail.Invoke(name);
		}
	}
Esempio n. 11
0
	public void GetField (ref string field, string name, FieldNotFound fail) 
	{
		if (type == JSONType.OBJECT) 
		{
			int index = keys.IndexOf(name);
			if (index >= 0) 
			{
				field = list[index].str;
				return;
			}
		}
		if (fail != null) 
		{
			fail.Invoke(name);
		}
	}
Esempio n. 12
0
	public bool GetField(ref uint field, string name, FieldNotFound fail = null) {
		if(type == JSONObject.Type.OBJECT) {
			int index = keys.IndexOf(name);
			if(index >= 0) {
				field = (uint)list[index].n;
				return true;
			}
		}
		if(fail != null) fail.Invoke(name);
		return false;
	}
Esempio n. 13
0
	public void GetField(ref float field, string name, FieldNotFound fail) {
Esempio n. 14
0
	public void GetField(ref double field, string name, FieldNotFound fail = null) {
#endif
		if(type == JSONObject.Type.OBJECT) {
			int index = keys.IndexOf(name);
			if(index >= 0){
				field = list[index].n;
				return;
			}
		}
		if(fail != null) fail.Invoke(name);
	}
Esempio n. 15
0
 public void GetField(string name, GetFieldResponse response, FieldNotFound fail = null)
 {
     if (response != null && IsObject)
     {
         int index = keys.IndexOf(name);
         if (index >= 0)
         {
             response.Invoke(list[index]);
             return;
         }
     }
     if (fail != null)
         fail.Invoke(name);
 }
Esempio n. 16
0
	public void GetField(ref uint field, string name, FieldNotFound fail = null) {
		if(type == Type.OBJECT) {
			int index = keys.IndexOf(name);
			if(index >= 0) {
				field = (uint)list[index].n;
				return;
			}
		}
		if(fail != null) fail.Invoke(name);
	}
 public bool GetField(ref float field, string name, FieldNotFound fail = null)
 {
Esempio n. 18
0
 private bool GetField(float field, string name, FieldNotFound fail = null)
 {