예제 #1
0
        public int CompareTo(ParentChildEntity other)
        {
            if (other == null)
            {
                return(1);
            }

            var order = ID.GetValueOrDefault().CompareTo(other.ID.GetValueOrDefault());

            if (order != 0)
            {
                return(order);
            }

            order = StringComparer.Ordinal.Compare(Name, other.Name);
            if (order != 0)
            {
                return(order);
            }

            order = ParentID.GetValueOrDefault().CompareTo(other.ParentID.GetValueOrDefault());
            if (order != 0)
            {
                return(order);
            }

            order = StringComparer.Ordinal.Compare(Type, other.Type);
            if (order != 0)
            {
                return(order);
            }

            return(0);
        }
예제 #2
0
        public void Write(IByteWriterBase writer)
        {
            writer.Write(WorkspaceID);
            writer.Write(ID);
            writer.Write(ParentID.GetValueOrDefault());
            writer.Write((int)StateType);
            writer.Write(DisplayName);
            writer.Write(Name);
            writer.Write((int)ActivityType);
            writer.Write(Version);
            writer.Write(IsSimulation);
            writer.Write(HasError);
            writer.Write(ErrorMessage);
            writer.Write(Server);
            writer.Write(ServerID);
            writer.Write(OriginatingResourceID);
            writer.Write(OriginalInstanceID);
            writer.Write(StartTime);
            writer.Write(EndTime);
            writer.Write(NumberOfSteps);
            writer.Write((int)ExecutionOrigin);
            writer.Write(ExecutionOriginDescription);
            writer.Write(ExecutingUser);
            writer.Write(EnvironmentID);
            writer.Write(SessionID);

            Serialize(writer, Inputs);
            Serialize(writer, Outputs);
            Serialize(writer, AssertResultList);
        }