Describes a conclusion emitted by a IActivityLoggerClientBase.
Beispiel #1
0
 /// <summary>
 /// Explicit test for <see cref="Text"/> and <see cref="Tag"/> equality.
 /// </summary>
 /// <param name="obj">Object to test.</param>
 /// <returns>True when equal.</returns>
 public override bool Equals(object obj)
 {
     if (obj is ActivityLogGroupConclusion)
     {
         ActivityLogGroupConclusion c = (ActivityLogGroupConclusion)obj;
         return(c.Tag == Tag && c.Text == Text);
     }
     return(false);
 }
Beispiel #2
0
        static ILogEntry ReadGroupClosed( int streamVersion, CKBinaryReader r, StreamLogType t, LogLevel logLevel )
        {
            DateTimeStamp time = new DateTimeStamp( DateTime.FromBinary( r.ReadInt64() ), (t & StreamLogType.HasUniquifier) != 0 ? r.ReadByte() : (Byte)0 );
            ActivityLogGroupConclusion[] conclusions = Util.Array.Empty<ActivityLogGroupConclusion>();
            if( (t & StreamLogType.HasConclusions) != 0 )
            {
                int conclusionsCount = streamVersion < 6 ? r.ReadInt32() : r.ReadNonNegativeSmallInt32();
                conclusions = new ActivityLogGroupConclusion[conclusionsCount];
                for( int i = 0; i < conclusionsCount; i++ )
                {
                    CKTrait cTags = ActivityMonitor.Tags.Register( r.ReadString() );
                    string cText = r.ReadString();
                    conclusions[i] = new ActivityLogGroupConclusion( cText, cTags );
                }
            }
            if( (t & StreamLogType.IsMultiCast) == 0 )
            {
                return new LECloseGroup( time, logLevel, conclusions );
            }
            Guid mId;
            int depth;
            LogEntryType prevType;
            DateTimeStamp prevTime;
            ReadMulticastFooter( streamVersion, r, t, out mId, out depth, out prevType, out prevTime );

            return new LEMCCloseGroup( mId, depth, prevTime, prevType, time, logLevel, conclusions );
        }