Show / Hide Table of Contents

    Class ConnectionComponent

    A builtin connection component

    Inheritance
    System.Object
    Component
    ConnectionComponent
    Inherited Members
    Component.Handle
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ToString()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: DesignData.SDS2.Model
    Assembly: DesignData.SDS2.Model.dll
    Syntax
    public class ConnectionComponent : Component

    Properties

    DesignedSpecification

    The connection specification the system used to design the current connection. This can vary from the requested when the system determines that the requested specification is invalid. Or if the requested spec is auto standard, this will be filled in with the actual connection specification that auto standard applied.

    Declaration
    public ConnectionSpecification DesignedSpecification { get; }
    Property Value
    Type Description
    ConnectionSpecification
    Remarks

    This should be considered readonly. Changes you make here will not modify the designed connection.

    InputSpecification

    The requested connection specification input by the user. This can be modified in place, or a new specification can be made and assigned to this.

    Declaration
    public ConnectionSpecification InputSpecification { get; set; }
    Property Value
    Type Description
    ConnectionSpecification
    Exceptions
    Type Condition
    InvalidValueException

    Thrown if the input specification isn't valid for this member type.

    Methods

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    Component.Dispose(Boolean)

    GetLabelForLockableName(String)

    Use this method to translate names in the map returned by GetLockables into the labels visible on the edit screen. This is useful to help figure out what name you should use in your code to map to a name you see on the screen.

    The returned name will be translated into the user's local language.

    If this returns an empty string, then the name was not found.

    Declaration
    public string GetLabelForLockableName(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    System.String
    Remarks

    Your final code should not include use of this method, this is for debugging purposes.

    GetLockable(String)

    Get a single lockable by name. Doing this with the map would work just as well, but this can be more efficient if you just need one.

    Declaration
    public Lockable GetLockable(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    Lockable
    Remarks

    This will be a copy of the lockable. If you make changes to it, to see them reflected you will need to pass it to SetLockable

    GetLockables()

    Get a map of all lockables on this connection

    Declaration
    public LockableDictionary GetLockables()
    Returns
    Type Description
    LockableDictionary

    SetLockable(String, Lockable)

    Apply a lockable value to this connection. You can only pass in names which would return a non-null lockable from GetLockable (so you can't add new lockable keys this way, you can just replace their value).

    Declaration
    public void SetLockable(string name, Lockable value)
    Parameters
    Type Name Description
    System.String name
    Lockable value
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when attempting to override a locked lockable within process. Unless you are implementing an extension of SDS2 (such as a custom member) this does not apply.

    Back to top