Example #1
0
        public void ReadEntity(IDictionary <string, EntityProperty> properties, OperationContext operationContext)
        {
            CurrentSSID = (int)properties[KeyCurrentSSID].Int32Value;

            ValidSSID.Clear();
            string vsData = properties[KeyValidSSID].StringValue;

            Assert.IsTrue(vsData != null);
            if (!vsData.Equals(""))
            {
                string[] vs = vsData.Split(',');
                for (int i = 0; i < vs.Length; ++i)
                {
                    ValidSSID.Add(int.Parse(vs[i]));
                }
            }

            SSIDHistory.Clear();
            string shData = properties[KeySSIDHist].StringValue;

            Assert.IsTrue(shData != null && !shData.Equals(""));
            string[] sh = shData.Split(',');
            for (int i = 0; i < sh.Length; ++i)
            {
                SSIDHistory.Add(int.Parse(sh[i]));
            }

            Assert.IsTrue(SSIDHistory.Count == CurrentSSID + 1);
        }
Example #2
0
        internal void CreateSnapshot(int parentOfNewHead)
        {
            Assert.IsTrue(SSIDHistory.Count == CurrentSSID + 1);
            Assert.IsTrue(parentOfNewHead >= 0 && parentOfNewHead <= CurrentSSID);

            ValidSSID.Add(CurrentSSID);
            CurrentSSID++;

            SSIDHistory.Add(parentOfNewHead);
        }