AssetLogMessage Class
Namespace: Stride.Core.Assets.DiagnosticsAssembly: Stride.Core.Assets.dll
Provides a specialized LogMessage to give specific information about an asset.
public class AssetLogMessage : LogMessage, ILogMessage
| Name | Description | |
|---|---|---|
| Constructors | ||
| AssetLogMessage(Package, IReference, LogMessageType, AssetMessageCode) | Initializes a new instance of the AssetLogMessage class. |
|
| AssetLogMessage(Package, IReference, LogMessageType, AssetMessageCode, Object[]) | Initializes a new instance of the AssetLogMessage class. |
|
| AssetLogMessage(Package, IReference, LogMessageType, String) | Initializes a new instance of the AssetLogMessage class. |
|
| Properties | ||
| AssetReference | Gets or sets the asset this message applies to (optional). |
|
| Character | ||
| File | ||
| Line | ||
| Member | Gets or sets the member of the asset this message applies to. May be null. |
|
| MessageCode | Gets or sets the message code. |
|
| Package | Gets or sets the package. |
|
| Related | Gets or sets the related references. |
|
| Methods | ||
| From(Package, IReference, ILogMessage, String, Int32, Int32) | ||
| ToString() | ||
Constructors
AssetLogMessage(Package, IReference, LogMessageType, AssetMessageCode)
Initializes a new instance of the AssetLogMessage class.
public AssetLogMessage(Package package, IReference assetReference, LogMessageType type, AssetMessageCode messageCode)
Parameters
| Type | Name | Description |
|---|---|---|
| Package | package | The package. |
| IReference | assetReference | The asset reference. |
| LogMessageType | type | The type. |
| AssetMessageCode | messageCode | The message code. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | asset |
AssetLogMessage(Package, IReference, LogMessageType, AssetMessageCode, Object[])
Initializes a new instance of the AssetLogMessage class.
public AssetLogMessage(Package package, IReference assetReference, LogMessageType type, AssetMessageCode messageCode, params object[] arguments)
Parameters
| Type | Name | Description |
|---|---|---|
| Package | package | The package. |
| IReference | assetReference | The asset reference. |
| LogMessageType | type | The type. |
| AssetMessageCode | messageCode | The message code. |
| System.Object[] | arguments | The arguments. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | asset |
AssetLogMessage(Package, IReference, LogMessageType, String)
Initializes a new instance of the AssetLogMessage class.
public AssetLogMessage(Package package, IReference assetReference, LogMessageType type, string text)
Parameters
| Type | Name | Description |
|---|---|---|
| Package | package | The package. |
| IReference | assetReference | The asset reference. |
| LogMessageType | type | The type. |
| System.String | text |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | asset |
Properties
AssetReference
Gets or sets the asset this message applies to (optional).
public IReference AssetReference { get; set; }
Property Value
| Type | Description |
|---|---|
| IReference | The asset. |
Character
public int Character { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
File
public string File { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Line
public int Line { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Member
Gets or sets the member of the asset this message applies to. May be null.
public IMemberDescriptor Member { get; set; }
Property Value
| Type | Description |
|---|---|
| Stride.Core.Reflection.IMemberDescriptor | The member. |
MessageCode
Gets or sets the message code.
public AssetMessageCode MessageCode { get; set; }
Property Value
| Type | Description |
|---|---|
| AssetMessageCode | The message code. |
Package
Gets or sets the package.
public Package Package { get; }
Property Value
| Type | Description |
|---|---|
| Package | The package. |
Related
Gets or sets the related references.
public List<IReference> Related { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<IReference> | The related. |
Methods
From(Package, IReference, ILogMessage, String, Int32, Int32)
public static AssetLogMessage From(Package package, IReference assetReference, ILogMessage logMessage, string assetPath, int line = 0, int character = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Package | package | |
| IReference | assetReference | |
| ILogMessage | logMessage | |
| System.String | assetPath | |
| System.Int32 | line | |
| System.Int32 | character |
Returns
| Type | Description |
|---|---|
| AssetLogMessage |
ToString()
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |