Ejemplo n.º 1
0
            private static void SetCommonFields(BuildEventArgs buildEventArgs, BuildEventArgsFields fields)
            {
                buildEventArgs.BuildEventContext = fields.BuildEventContext;

                if ((fields.Flags & BuildEventArgsFieldFlags.ThreadId) != 0)
                {
                    buildEventArgsFieldThreadId.SetValue(buildEventArgs, fields.ThreadId);
                }

                if ((fields.Flags & BuildEventArgsFieldFlags.SenderName) != 0)
                {
                    buildEventArgsFieldSenderName.SetValue(buildEventArgs, fields.SenderName);
                }

                if ((fields.Flags & BuildEventArgsFieldFlags.Timestamp) != 0)
                {
                    buildEventArgsFieldTimestamp.SetValue(buildEventArgs, fields.Timestamp);
                }
            }
Ejemplo n.º 2
0
            private BuildEventArgsFields ReadBuildEventArgsFields()
            {
                var flags  = (BuildEventArgsFieldFlags)this.ReadInt32();
                var result = new BuildEventArgsFields
                {
                    Flags = flags
                };

                if ((flags & BuildEventArgsFieldFlags.Message) != 0)
                {
                    result.Message = this.ReadString();
                }

                if ((flags & BuildEventArgsFieldFlags.BuildEventContext) != 0)
                {
                    result.BuildEventContext = this.ReadBuildEventContext();
                }

                if ((flags & BuildEventArgsFieldFlags.ThreadId) != 0)
                {
                    result.ThreadId = this.ReadInt32();
                }

                if ((flags & BuildEventArgsFieldFlags.HelpHeyword) != 0)
                {
                    result.HelpKeyword = this.ReadString();
                }

                if ((flags & BuildEventArgsFieldFlags.SenderName) != 0)
                {
                    result.SenderName = this.ReadString();
                }

                if ((flags & BuildEventArgsFieldFlags.Timestamp) != 0)
                {
                    result.Timestamp = this.ReadDateTime();
                }

                if ((flags & BuildEventArgsFieldFlags.Subcategory) != 0)
                {
                    result.Subcategory = this.ReadString();
                }

                if ((flags & BuildEventArgsFieldFlags.Code) != 0)
                {
                    result.Code = this.ReadString();
                }

                if ((flags & BuildEventArgsFieldFlags.File) != 0)
                {
                    result.File = this.ReadString();
                }

                if ((flags & BuildEventArgsFieldFlags.ProjectFile) != 0)
                {
                    result.ProjectFile = this.ReadString();
                }

                if ((flags & BuildEventArgsFieldFlags.LineNumber) != 0)
                {
                    result.LineNumber = this.ReadInt32();
                }

                if ((flags & BuildEventArgsFieldFlags.ColumnNumber) != 0)
                {
                    result.ColumnNumber = this.ReadInt32();
                }

                if ((flags & BuildEventArgsFieldFlags.EndLineNumber) != 0)
                {
                    result.EndLineNumber = this.ReadInt32();
                }

                if ((flags & BuildEventArgsFieldFlags.EndColumnNumber) != 0)
                {
                    result.EndColumnNumber = this.ReadInt32();
                }

                return(result);
            }