Show / Hide Table of Contents

    Class Message

    An element that stores warning messages.

    Inheritance
    System.Object
    Element
    GeometricElement
    Message
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    GeometricElement.Bounds
    GeometricElement.Transform
    GeometricElement.Material
    GeometricElement.Representation
    GeometricElement.IsElementDefinition
    GeometricElement.ModifyVertexAttributes
    GeometricElement.UpdateRepresentations()
    GeometricElement.UpdateBoundsAndComputeSolid(Boolean)
    GeometricElement.CreateInstance(Transform, String)
    GeometricElement.ToMesh(Boolean)
    GeometricElement.HasGeometry()
    GeometricElement.Intersects(Plane, Dictionary<Guid, List<Polygon>>, Dictionary<Guid, List<Polygon>>, Dictionary<Guid, List<Line>>)
    GeometricElement.TryToGraphicsBuffers(List<GraphicsBuffers>, String, Nullable<MeshPrimitive.ModeEnum>)
    Element.Id
    Element.Name
    Element.AdditionalProperties
    Element.PropertyChanged
    Element.RaisePropertyChanged(String)
    Element.SetMapping(String, MappingBase)
    Element.GetMapping(String)
    Element.GetMapping<T>(String)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Elements.Annotations
    Assembly: Hypar.Elements.dll
    Syntax
    [JsonConverter(typeof(JsonInheritanceConverter), new object[]{"discriminator"})]
    public class Message : GeometricElement, INotifyPropertyChanged

    Constructors

    Message()

    Empty constructor.

    Declaration
    public Message()

    Message(String, String, String, MessageSeverity, Transform, Material, Representation, Boolean, Guid, String)

    Default json constructor for a message that may have geometry.

    Declaration
    [JsonConstructor]
    public Message(string message, string shortMessage, string stackTrace, MessageSeverity severity, Transform transform = null, Material material = null, Representation representation = null, bool isElementDefinition = false, Guid id = default(Guid), string name = null)
    Parameters
    Type Name Description
    System.String message
    System.String shortMessage
    System.String stackTrace
    MessageSeverity severity
    Transform transform
    Material material
    Representation representation
    System.Boolean isElementDefinition
    System.Guid id
    System.String name

    Properties

    ErrorMaterial

    The material used for messages with "Error" severity.

    Declaration
    public static Material ErrorMaterial { get; set; }
    Property Value
    Type Description
    Material

    InfoMaterial

    The material used for messages with "Info" severity.

    Declaration
    public static Material InfoMaterial { get; set; }
    Property Value
    Type Description
    Material

    MessageText

    A warning message for the user.

    Declaration
    [JsonProperty("Message", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
    public string MessageText { get; set; }
    Property Value
    Type Description
    System.String

    Severity

    Developer specific message about the failure in the code.

    Declaration
    [JsonProperty("Severity", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
    [JsonConverter(typeof(StringEnumConverter))]
    public MessageSeverity Severity { get; set; }
    Property Value
    Type Description
    MessageSeverity

    ShortMessage

    A short message for the user. For a more detailed message, use MessageText.

    Declaration
    [JsonProperty("ShortMessage", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
    public string ShortMessage { get; set; }
    Property Value
    Type Description
    System.String

    StackTrace

    Developer specific message about the failure in the code.

    Declaration
    [JsonProperty("Stack Trace", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
    public string StackTrace { get; set; }
    Property Value
    Type Description
    System.String

    WarningMaterial

    The material used for messages with "Warning" severity.

    Declaration
    public static Material WarningMaterial { get; set; }
    Property Value
    Type Description
    Material

    Methods

    DetailsFromException(Exception)

    Extract the string details including any stack trace from the exception.

    Declaration
    public static string DetailsFromException(Exception e)
    Parameters
    Type Name Description
    System.Exception e

    The Exception.

    Returns
    Type Description
    System.String

    Error(Nullable<Vector3>, String)

    Create an error message.

    Declaration
    public static Message Error(Vector3? point, string message = null)
    Parameters
    Type Name Description
    System.Nullable<Vector3> point
    System.String message
    Returns
    Type Description
    Message

    FromCurve(String, BoundedCurve, MessageSeverity, Double, String, String, String)

    Create a simple message along a curve.

    Declaration
    public static Message FromCurve(string messageText, BoundedCurve curve, MessageSeverity severity = MessageSeverity.Warning, double sideLength = 0.3, string name = null, string stackTrace = null, string shortMessage = null)
    Parameters
    Type Name Description
    System.String messageText

    The message to the user.

    BoundedCurve curve
    MessageSeverity severity

    The severity of the message.

    System.Double sideLength
    System.String name

    The name given to the message.

    System.String stackTrace

    Any stack trace associated with the message.

    System.String shortMessage

    A short message.

    Returns
    Type Description
    Message

    FromPoint(String, Nullable<Vector3>, MessageSeverity, Double, String, String, String)

    Create a simple message at a point.

    Declaration
    public static Message FromPoint(string messageText, Vector3? point, MessageSeverity severity = MessageSeverity.Warning, double sideLength = 0.3, string name = null, string stackTrace = null, string shortMessage = null)
    Parameters
    Type Name Description
    System.String messageText

    The message to the user.

    System.Nullable<Vector3> point
    MessageSeverity severity

    The severity of the message.

    System.Double sideLength
    System.String name

    The name given to the message.

    System.String stackTrace

    Any stack trace associated with the message.

    System.String shortMessage

    A short message.

    Returns
    Type Description
    Message

    FromPolygon(String, Polygon, MessageSeverity, Double, String, String, String)

    Create a simple message from a polygon.

    Declaration
    public static Message FromPolygon(string messageText, Polygon polygon, MessageSeverity severity = MessageSeverity.Warning, double height = 0, string name = null, string stackTrace = null, string shortMessage = null)
    Parameters
    Type Name Description
    System.String messageText

    The message to the user.

    Polygon polygon
    MessageSeverity severity

    The severity of the message.

    System.Double height
    System.String name

    The name given to the message.

    System.String stackTrace

    Any stack trace associated with the message.

    System.String shortMessage

    A short message.

    Returns
    Type Description
    Message

    FromPolygons(String, IEnumerable<Polygon>, MessageSeverity, Double, String, String, String)

    Create a simple message from polygons.

    Declaration
    public static Message[] FromPolygons(string messageText, IEnumerable<Polygon> polygons, MessageSeverity severity = MessageSeverity.Warning, double height = 0, string name = null, string stackTrace = null, string shortMessage = null)
    Parameters
    Type Name Description
    System.String messageText

    The message to the user.

    System.Collections.Generic.IEnumerable<Polygon> polygons
    MessageSeverity severity

    The severity of the message.

    System.Double height
    System.String name

    The name given to the message.

    System.String stackTrace

    Any stack trace associated with the message.

    System.String shortMessage

    A short message.

    Returns
    Type Description
    Message[]

    FromText(String, String, MessageSeverity, String, String)

    Create a simple message from the given text.

    Declaration
    public static Message FromText(string message, string name = null, MessageSeverity severity = MessageSeverity.Warning, string stackTrace = null, string shortMessage = null)
    Parameters
    Type Name Description
    System.String message

    The message to the user.

    System.String name

    The name given to the message.

    MessageSeverity severity

    The severity of the message.

    System.String stackTrace

    Any stack trace associated with the message.

    System.String shortMessage

    A short message.

    Returns
    Type Description
    Message

    Info(Nullable<Vector3>, String)

    Create an informational message.

    Declaration
    public static Message Info(Vector3? point, string message = null)
    Parameters
    Type Name Description
    System.Nullable<Vector3> point
    System.String message
    Returns
    Type Description
    Message

    Warning(Nullable<Vector3>, String)

    Create a warning message.

    Declaration
    public static Message Warning(Vector3? point, string message = null)
    Parameters
    Type Name Description
    System.Nullable<Vector3> point
    System.String message
    Returns
    Type Description
    Message

    Implements

    System.ComponentModel.INotifyPropertyChanged

    Extension Methods

    ElementProxyExtensions.Proxy<T>(T, String)
    Identity.AddOverrideIdentity(Element, IOverride)
    Identity.AddOverrideIdentity(Element, String, String, Object)
    Identity.AddOverrideValue(Element, String, Object)
    Identity.OverrideIds<T>(Element, String)