Show / Hide Table of Contents

    Class Linker

    Before you do anything else with any SDS/2 assemblies, call Linker.Link with appropriate version requirements. This class will find the other SDS/2 .net assemblies from that. You should copy the assembly for this class and distribute it with your program (DesignData.SDS2.Linker.dll).

    But that's the only SDS/2 assembly you should distribute/copy.

    Inheritance
    object
    Linker
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: DesignData.SDS2
    Assembly: DesignData.SDS2.Linker.dll
    Syntax
    public class Linker

    Constructors

    Linker()

    Before you do anything else with any SDS/2 assemblies, call Linker.Link with appropriate version requirements. This class will find the other SDS/2 .net assemblies from that. You should copy the assembly for this class and distribute it with your program (DesignData.SDS2.Linker.dll).

    But that's the only SDS/2 assembly you should distribute/copy.

    Declaration
    public Linker()

    Methods

    IsValidInstallation(string)

    Return true if the current installation at a given path has the required binaries to run the API.

    Declaration
    public static bool IsValidInstallation(string path)
    Parameters
    Type Name Description
    string path
    Returns
    Type Description
    bool

    Link(MajorVersion, int)

    Call this to find the installed SDS/2 libraries on the system and use them.

    This has to be called before entering a function that used any other SDS/2 assemblies. So, if your Main method doesn't you can call this there, or if it does you can simply declare a static readonly bool and assign it to the result of calling this. That variable will be initialized (and so this will be called) before entering Main, and before .Net will try to load any other SDS/2 assemblies.

    Declaration
    public static bool Link(MajorVersion major, int minor = 0)
    Parameters
    Type Name Description
    MajorVersion major

    The major version of SDS/2 to grab libraries for.

    int minor

    The minimum minor version required, often this should just be zero, unless there's a known problem with your program running against an earlier minor version.

    Returns
    Type Description
    bool
    Remarks

    This will not allow you to link against multiple major versions with the same program. You have to choose one to use at the start. You can only call this once, any more calls will throw.

    Link(int, int)

    Call this to find the installed SDS/2 libraries on the system and use them.

    Declaration
    public static bool Link(int major, int minor = 0)
    Parameters
    Type Name Description
    int major

    The major version of SDS/2 to grab libraries for.

    int minor

    The minimum minor version required, often this should just be zero, unless there's a known problem with your program running against an earlier minor version.

    Returns
    Type Description
    bool
    Remarks

    This will not allow you to link against multiple major versions with the same program. You have to choose one to use at the start. You can only call this once, any more calls will throw.

    Link(string)

    If you need to supply the full path to the SDS/2 installation. This directory should contain all SDS/2 assemblies and sds2native.dll as well as other dlls packaged with it.

    Declaration
    public static bool Link(string path)
    Parameters
    Type Name Description
    string path
    Returns
    Type Description
    bool
    Remarks

    Generally you don't want this, you want a versioned variant which will find this path by looking at installation artifacts in the windows registry.

    Back to top