Esempio n. 1
0
 public void GetField(string name, GetFieldResponse response, FieldNotFound fail = null)
 {
     if (response != null && type == Type.OBJECT)
     {
         int index = keys.IndexOf(name);
         if (index >= 0)
         {
             response.Invoke(list[index]);
             return;
         }
     }
     fail?.Invoke(name);
 }
Esempio n. 2
0
 // Default parameters fix
 public void GetField(ref string field, string name, FieldNotFound fail = null)
 {
     if (type == Type.OBJECT)
     {
         int index = keys.IndexOf(name);
         if (index >= 0)
         {
             field = list[index].str;
             return;
         }
     }
     fail?.Invoke(name);
 }
 public void GetField(string name, GetFieldResponse response, FieldNotFound fail = null)
 {
     if (response != null && IsObject)
     {
         int num = keys.IndexOf(name);
         if (num >= 0)
         {
             response(list[num]);
             return;
         }
     }
     fail?.Invoke(name);
 }
 public bool GetField(ref string field, string name, FieldNotFound fail = null)
 {
     if (IsObject)
     {
         int num = keys.IndexOf(name);
         if (num >= 0)
         {
             field = list[num].str;
             return(true);
         }
     }
     fail?.Invoke(name);
     return(false);
 }
 public bool GetField(ref float field, string name, FieldNotFound fail = null)
 {
     if (type == Type.OBJECT)
     {
         int num = keys.IndexOf(name);
         if (num >= 0)
         {
             field = list[num].n;
             return(true);
         }
     }
     fail?.Invoke(name);
     return(false);
 }
Esempio n. 6
0
        public bool GetField(ref bool field, string name, FieldNotFound fail = null)
        {
            if (type == Type.OBJECT)
            {
                var index = keys.IndexOf(name);
                if (index >= 0)
                {
                    field = list[index].b;
                    return(true);
                }
            }

            fail?.Invoke(name);
            return(false);
        }
Esempio n. 7
0
        public bool GetField(ref uint field, string name, FieldNotFound fail = null)
        {
            if (IsObject)
            {
                var index = keys.IndexOf(name);
                if (index >= 0)
                {
                    field = (uint)list[index].n;
                    return(true);
                }
            }

            fail?.Invoke(name);
            return(false);
        }
        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. 9
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. 10
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. 11
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. 12
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. 13
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. 14
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. 15
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. 16
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. 17
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);
	}