Beispiel #1
0
 public NList Append(NList value)
 {
     if (value.Count > 0)
     {
         _List.AddRange(value._List);
     }
     return(this);
 }
Beispiel #2
0
        public bool TrySet <T>(T value, out NList result)
        {
            result = null;
            if (!(Var is Var <T>))
            {
                return(false);
            }

            Var <T> var       = Var as Var <T>;
            T       old_value = var.Value;
            T       new_value = value;

            if (old_value.Equals(new_value))
            {
                return(false);
            }

            Var.Value = value;

            result = NList.New();
            result.Add(old_value);
            result.Add(new_value);
            return(true);
        }
Beispiel #3
0
 public static bool IsEmpty(NList list)
 {
     return(list == null || list == Empty);
 }
Beispiel #4
0
 public NList(NList list)
 {
     _List = new List <Var>();
     _List.AddRange(list._List);
 }