• DuetAPI
  • DuetAPIClient
  • DuetControlServer
  • DuetWebServer
Show / Hide Table of Contents
  • DuetAPI
    • CodeChannel
  • DuetAPI.Commands
    • Acknowledge
    • AddHttpEndpoint
    • AddUserSession
    • BaseCommand
    • BaseResponse
    • Cancel
    • Code
    • CodeFlags
    • CodeParameter
    • CodeParameterConverter
    • CodeParserBuffer
    • CodeParserException
    • CodeResult
    • CodeResultConverter
    • CodeType
    • Command
    • Command<T>
    • ErrorResponse
    • EvaluateExpression
    • Flush
    • GetFileInfo
    • GetObjectModel
    • HttpResponseType
    • Ignore
    • InstallPlugin
    • KeywordType
    • LockObjectModel
    • PatchObjectModel
    • ReceivedHttpRequest
    • RemoveHttpEndpoint
    • RemoveUserSession
    • Resolve
    • ResolvePath
    • Response<T>
    • SendHttpResponse
    • SetObjectModel
    • SetPluginData
    • SetUpdateStatus
    • SimpleCode
    • StartPlugin
    • StopPlugin
    • SyncObjectModel
    • UninstallPlugin
    • UnlockObjectModel
    • WriteMessage
  • DuetAPI.Connection
    • ConnectionMode
    • Defaults
    • IncompatibleVersionException
    • InterceptionMode
    • SubscriptionMode
  • DuetAPI.Connection.InitMessages
    • ClientInitMessage
    • CommandInitMessage
    • InterceptInitMessage
    • ServerInitMessage
    • SubscribeInitMessage
  • DuetAPI.ObjectModel
    • AccessLevel
    • AnalogSensor
    • AnalogSensorType
    • AnalogSensorTypeConverter
    • Axis
    • BeepRequest
    • Board
    • BoardState
    • Build
    • BuildObject
    • Compatibility
    • CoreKinematics
    • CurrentMove
    • DAA
    • DeltaKinematics
    • DeltaTower
    • DirectDisplay
    • Directories
    • DistanceUnit
    • Endstop
    • EndstopType
    • Extruder
    • ExtruderNonlinear
    • Fan
    • FanThermostaticControl
    • FilamentMonitor
    • FilamentMonitorStatus
    • FilamentMonitorType
    • GpInputPort
    • GpOutputPort
    • HangprinterKinematics
    • Heat
    • Heater
    • HeaterModel
    • HeaterModelPID
    • HeaterMonitor
    • HeaterMonitorAction
    • HeaterMonitorCondition
    • HeaterState
    • HttpEndpoint
    • HttpEndpointType
    • InputChannel
    • InputChannelState
    • Inputs
    • InterfaceType
    • Job
    • Kinematics
    • KinematicsName
    • KinematicsNameConverter
    • LaserFilamentMonitor
    • LaserFilamentMonitorCalibrated
    • LaserFilamentMonitorConfigured
    • Layer
    • Limits
    • LinuxPropertyAttribute
    • LogLevel
    • MachineMode
    • MachineStatus
    • Message
    • MessageBox
    • MessageBoxMode
    • MessageType
    • Microstepping
    • MinMaxCurrent<T>
    • ModelCollection
    • ModelCollection<T>
    • ModelDictionary<TValue>
    • ModelGrowingCollection
    • ModelGrowingCollection<T>
    • ModelObject
    • MotorsIdleControl
    • Move
    • MoveCalibration
    • MoveCompensation
    • MoveCompensationType
    • MoveDeviations
    • Network
    • NetworkInterface
    • NetworkProtocol
    • ObjectModel
    • ObjectModelConverter
    • ParsedFileInfo
    • ParsedFileInfoConverter
    • ParsedThumbnail
    • Plugin
    • PluginManifest
    • Probe
    • ProbeGrid
    • ProbeType
    • PulsedFilamentMonitor
    • PulsedFilamentMonitorCalibrated
    • PulsedFilamentMonitorConfigured
    • RestorePoint
    • RotatingMagnetFilamentMonitor
    • RotatingMagnetFilamentMonitorCalibrated
    • RotatingMagnetFilamentMonitorConfigured
    • Scanner
    • ScannerStatus
    • ScaraKinematics
    • Sensors
    • SessionType
    • SimpleFilamentMonitor
    • Skew
    • Spindle
    • State
    • TiltCorrection
    • TimesLeft
    • Tool
    • ToolRetraction
    • ToolState
    • UserSession
    • UserVariable
    • Volume
    • ZLeadscrewKinematics
  • DuetAPI.Utility
    • DriverId
    • FileLists
    • Heightmap
    • JsonCamelCaseStringEnumConverter
    • JsonCharEnumConverter
    • JsonHelper
    • JsonLowerCaseStringEnumConverter
    • JsonPolymorphicWriteOnlyConverter<T>
    • JsonRegexListConverter
    • JsonShortDateTimeConverter
    • RequiredPermissionsAttribute
    • SbcPermissions
    • SbcPermissionsConverter
  • DuetAPIClient
    • BaseCommandConnection
    • BaseConnection
    • CommandConnection
    • HttpEndpointConnection
    • HttpEndpointUnixSocket
    • HttpEndpointUnixSocket.EndpointRequestReceived
    • InterceptConnection
    • InternalServerException
    • SubscribeConnection
  • DuetControlServer
    • Program
    • Settings
  • DuetControlServer.Codes
    • GCodes
    • MCodes
    • TCodes
  • DuetControlServer.Commands
    • AddHttpEndpoint
    • AddUserSession
    • Code
    • EvaluateExpression
    • Flush
    • GetFileInfo
    • GetObjectModel
    • IConnectionCommand
    • InstallPlugin
    • LockObjectModel
    • PatchObjectModel
    • RemoveHttpEndpoint
    • RemoveUserSession
    • ResolvePath
    • SetObjectModel
    • SetPluginData
    • SetUpdateStatus
    • SimpleCode
    • StartPlugin
    • StopPlugin
    • SyncObjectModel
    • UninstallPlugin
    • UnlockObjectModel
    • WriteMessage
  • DuetControlServer.FileExecution
    • Job
    • Macro
  • DuetControlServer.Files
    • CodeBlock
    • CodeFile
    • ConfigOverride
    • FileDirectory
    • FilePath
    • InfoParser
  • DuetControlServer.IPC
    • Connection
    • LockManager
    • Server
  • DuetControlServer.IPC.Processors
    • Base
    • CodeInterception
    • Command
    • ModelSubscription
  • DuetControlServer.Model
    • Expressions
    • Filter
    • ItemPathNode
    • Observer
    • Observer.PropertyPathChanged
    • PeriodicUpdater
    • PropertyChangeType
    • Provider
    • Updater
  • DuetControlServer.SPI
    • DataTransfer
    • EvaluateExpressionRequest
    • Interface
    • Interface.MovementLock
  • DuetControlServer.SPI.Channel
    • LockRequest
    • Manager
    • Processor
    • State
  • DuetControlServer.SPI.Communication
    • Consts
  • DuetControlServer.SPI.Communication.FirmwareRequests
    • AbortFileHeader
    • CodeBufferUpdateHeader
    • DoCodeHeader
    • EvaluationResultHeader
    • ExecuteMacroHeader
    • FileChunkHeader
    • PrintPausedHeader
    • PrintPausedReason
    • Request
  • DuetControlServer.SPI.Communication.LinuxRequests
    • AssignFilamentHeader
    • CodeFlags
    • CodeHeader
    • CodeParameter
    • FileChunkHeader
    • GetObjectModelHeader
    • MacroCompleteHeader
    • PrintStartedHeader
    • PrintStoppedHeader
    • Request
    • SetObjectModelHeader
  • DuetControlServer.SPI.Communication.Shared
    • CodeChannelHeader
    • DataType
    • HeightMapHeader
    • MessageHeader
    • MessageTypeFlags
    • PacketHeader
    • PrintStoppedReason
    • StringHeader
    • TransferHeader
    • TransferResponse
  • DuetControlServer.SPI.Serialization
    • Reader
    • Writer
  • DuetControlServer.Utility
    • CRC16
    • CRC32
    • FilamentManager
    • Logger
    • Plugins
    • UF2
  • DuetWebServer
    • Program
    • Startup
  • DuetWebServer.Controllers
    • MachineController
    • WebSocketController
  • DuetWebServer.FileProviders
    • DuetFileProvider
  • DuetWebServer.Middleware
    • CustomEndpointMiddleware
    • FallbackMiddleware
    • HttpEndpointConnection
  • DuetWebServer.Services
    • ModelObserver
    • ModelObserver.WebDirectoryChanged

Class CodeResult

List-based representation of a code result. Each item represents a Message instance which can be easily converted to a string

Inheritance
System.Object
System.Collections.Generic.List<Message>
CodeResult
Implements
System.Collections.Generic.IList<Message>
System.Collections.Generic.ICollection<Message>
System.Collections.Generic.IReadOnlyList<Message>
System.Collections.Generic.IReadOnlyCollection<Message>
System.Collections.Generic.IEnumerable<Message>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
Inherited Members
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.IList.get_Item(System.Int32)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Add(DuetAPI.ObjectModel.Message)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.AddRange(System.Collections.Generic.IEnumerable<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.AsReadOnly()
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.BinarySearch(System.Int32, System.Int32, DuetAPI.ObjectModel.Message, System.Collections.Generic.IComparer<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.BinarySearch(DuetAPI.ObjectModel.Message)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.BinarySearch(DuetAPI.ObjectModel.Message, System.Collections.Generic.IComparer<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Clear()
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Contains(DuetAPI.ObjectModel.Message)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.ConvertAll<TOutput>(System.Converter<DuetAPI.ObjectModel.Message, TOutput>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.CopyTo(System.Int32, DuetAPI.ObjectModel.Message[], System.Int32, System.Int32)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.CopyTo(DuetAPI.ObjectModel.Message[])
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.CopyTo(DuetAPI.ObjectModel.Message[], System.Int32)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Exists(System.Predicate<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Find(System.Predicate<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.FindAll(System.Predicate<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.FindIndex(System.Int32, System.Int32, System.Predicate<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.FindIndex(System.Int32, System.Predicate<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.FindIndex(System.Predicate<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.FindLast(System.Predicate<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.FindLastIndex(System.Int32, System.Int32, System.Predicate<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.FindLastIndex(System.Int32, System.Predicate<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.FindLastIndex(System.Predicate<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.ForEach(System.Action<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.GetEnumerator()
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.GetRange(System.Int32, System.Int32)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.IndexOf(DuetAPI.ObjectModel.Message)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.IndexOf(DuetAPI.ObjectModel.Message, System.Int32)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.IndexOf(DuetAPI.ObjectModel.Message, System.Int32, System.Int32)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Insert(System.Int32, DuetAPI.ObjectModel.Message)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.InsertRange(System.Int32, System.Collections.Generic.IEnumerable<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.LastIndexOf(DuetAPI.ObjectModel.Message)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.LastIndexOf(DuetAPI.ObjectModel.Message, System.Int32)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.LastIndexOf(DuetAPI.ObjectModel.Message, System.Int32, System.Int32)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Remove(DuetAPI.ObjectModel.Message)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.RemoveAll(System.Predicate<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.RemoveAt(System.Int32)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.RemoveRange(System.Int32, System.Int32)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Reverse()
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Reverse(System.Int32, System.Int32)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Sort()
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Sort(System.Collections.Generic.IComparer<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Sort(System.Comparison<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Sort(System.Int32, System.Int32, System.Collections.Generic.IComparer<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.Generic.IEnumerable<DuetAPI.ObjectModel.Message>.GetEnumerator()
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.IList.Add(System.Object)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.IList.Contains(System.Object)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.IList.IndexOf(System.Object)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.IList.Remove(System.Object)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.ToArray()
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.TrimExcess()
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.TrueForAll(System.Predicate<DuetAPI.ObjectModel.Message>)
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Capacity
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Count
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.Item[System.Int32]
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.Generic.ICollection<DuetAPI.ObjectModel.Message>.IsReadOnly
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.ICollection.IsSynchronized
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.ICollection.SyncRoot
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.IList.IsFixedSize
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.IList.IsReadOnly
System.Collections.Generic.List<DuetAPI.ObjectModel.Message>.System.Collections.IList.Item[System.Int32]
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)
Namespace: DuetAPI.Commands
Assembly: DuetAPI.dll
Syntax
public sealed class CodeResult : List<Message>, IList<Message>, ICollection<Message>, IReadOnlyList<Message>, IReadOnlyCollection<Message>, IEnumerable<Message>, IList, ICollection, IEnumerable
Remarks

This class is now deprecated. It will be replaced with Message in foreseeable future

Constructors

CodeResult()

Create a new code result indicating success

Declaration
public CodeResult()

CodeResult(MessageType, String)

Create a new code result with an initial message

Declaration
public CodeResult(MessageType type, string content)
Parameters
Type Name Description
MessageType type

Message type

System.String content

Message content

Properties

IsEmpty

Checks if the message contains any data

Declaration
public bool IsEmpty { get; }
Property Value
Type Description
System.Boolean

IsSuccessful

Indicates if the code could complete without an error

Declaration
public bool IsSuccessful { get; }
Property Value
Type Description
System.Boolean

Methods

Add(MessageType, String)

Add another message

Declaration
public void Add(MessageType type, string content)
Parameters
Type Name Description
MessageType type

Message type

System.String content

Message content

ToString()

Converts the CodeResult to a string

Declaration
public override string ToString()
Returns
Type Description
System.String

The CodeResult as a string

Overrides
System.Object.ToString()

Implements

System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
In This Article
Back to top Generated by DocFX