コード例 #1
0
        public bool EqualsData(EntitiesSerializer obj)
        {
            var _serializer = obj as EntitiesSerializer;

            if (!Enumerable.SequenceEqual(actionList, _serializer.actionList))
            {
                return(false);
            }
            if (!Enumerable.SequenceEqual(focusList, _serializer.focusList))
            {
                return(false);
            }
            if (!Enumerable.SequenceEqual(triggerList, _serializer.triggerList))
            {
                return(false);
            }

            if (!Enumerable.SequenceEqual(randomSelectList, _serializer.randomSelectList))
            {
                return(false);
            }
            if (!Enumerable.SequenceEqual(selectList, _serializer.selectList))
            {
                return(false);
            }
            if (!Enumerable.SequenceEqual(sequenceList, _serializer.sequenceList))
            {
                return(false);
            }

            if (!Enumerable.SequenceEqual(ifElseList, _serializer.ifElseList))
            {
                return(false);
            }
            if (!Enumerable.SequenceEqual(ifList, _serializer.ifList))
            {
                return(false);
            }
            if (!Enumerable.SequenceEqual(untilList, _serializer.untilList))
            {
                return(false);
            }

            if (!Enumerable.SequenceEqual(forceFailureList, _serializer.forceFailureList))
            {
                return(false);
            }
            if (!Enumerable.SequenceEqual(forceSuccessList, _serializer.forceSuccessList))
            {
                return(false);
            }
            if (!Enumerable.SequenceEqual(invertList, _serializer.invertList))
            {
                return(false);
            }
            if (!Enumerable.SequenceEqual(iterateList, _serializer.iterateList))
            {
                return(false);
            }
            if (!Enumerable.SequenceEqual(stochasticList, _serializer.stochasticList))
            {
                return(false);
            }
            return(true);
        }
コード例 #2
0
 public static string Serialize(EntitiesSerializer serializer)
 {
     return(JsonConvert.SerializeObject(serializer));
 }