private DateTime GetDateTime(AttributeNames attributeIndex) { return(Serialization.GetDateTime(GetString(attributeIndex))); }
private int GetInteger(AttributeNames attributeIndex) { return(Serialization.GetInteger(GetString(attributeIndex))); }
private bool GetBoolean(AttributeNames attributeIndex) { return(Serialization.GetBoolean(GetString(attributeIndex))); }
private void SetAttributes(object node) { var metadata = node as Metadata; if (metadata != null) { metadata.Name = Dequeue(); metadata.Value = Dequeue(); return; } var property = node as Property; if (property != null) { property.Name = Dequeue(); property.Value = Dequeue(); return; } var message = node as Message; if (message != null) { message.IsLowRelevance = Serialization.GetBoolean(Dequeue()); message.Timestamp = Serialization.GetDateTime(Dequeue()); message.Text = Dequeue(); return; } var folder = node as Folder; if (folder != null) { folder.IsLowRelevance = Serialization.GetBoolean(Dequeue()); return; } var namedNode = node as NamedNode; if (namedNode != null) { namedNode.Name = Dequeue(); } var textNode = node as TextNode; if (textNode != null) { textNode.Text = Dequeue(); } var timedNode = node as TimedNode; if (timedNode != null) { timedNode.StartTime = Serialization.GetDateTime(Dequeue()); timedNode.EndTime = Serialization.GetDateTime(Dequeue()); if (formatSupportsTimedNodeId) { timedNode.NodeId = Serialization.GetInteger(Dequeue()); } } var task = node as Task; if (task != null) { task.FromAssembly = Dequeue(); task.CommandLineArguments = Dequeue(); if (formatSupportsSourceFiles) { task.SourceFilePath = Dequeue(); } return; } var target = node as Target; if (target != null) { target.DependsOnTargets = Dequeue(); target.IsLowRelevance = Serialization.GetBoolean(Dequeue()); if (formatSupportsSourceFiles) { target.SourceFilePath = Dequeue(); } return; } var diagnostic = node as AbstractDiagnostic; if (diagnostic != null) { diagnostic.Code = Dequeue(); diagnostic.File = Dequeue(); diagnostic.LineNumber = Serialization.GetInteger(Dequeue()); diagnostic.ColumnNumber = Serialization.GetInteger(Dequeue()); diagnostic.EndLineNumber = Serialization.GetInteger(Dequeue()); diagnostic.EndColumnNumber = Serialization.GetInteger(Dequeue()); diagnostic.ProjectFile = Dequeue(); return; } var project = node as Project; if (project != null) { project.ProjectFile = Dequeue(); return; } var build = node as Build; if (build != null) { build.Succeeded = Serialization.GetBoolean(Dequeue()); build.IsAnalyzed = Serialization.GetBoolean(Dequeue()); return; } }
private int GetInteger(XElement element, AttributeNames attributeIndex) { return(Serialization.GetInteger(GetString(element, attributeIndex))); }
private DateTime GetDateTime(XElement element, AttributeNames attributeIndex) { return(Serialization.GetDateTime(GetString(element, attributeIndex))); }
private bool GetBoolean(XElement element, AttributeNames attributeIndex) { return(Serialization.GetBoolean(GetString(element, attributeIndex))); }